X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0f9dad56ca86ae50217dbc763f95f132fede9c53..d24f6738f58de48ac1fea23849f12285034f86c4:/buildtools/Cmake/Scripts/generate_memcheck_tests.pl diff --git a/buildtools/Cmake/Scripts/generate_memcheck_tests.pl b/buildtools/Cmake/Scripts/generate_memcheck_tests.pl index 3f7652f8b5..df0880674f 100755 --- a/buildtools/Cmake/Scripts/generate_memcheck_tests.pl +++ b/buildtools/Cmake/Scripts/generate_memcheck_tests.pl @@ -8,7 +8,7 @@ if ( $#ARGV != 1 ) { } my ($proj_dir) = $ARGV[0]; -open MAKETEST, $ARGV[1] or die "Unable to open $ARGV[1]. $!\n"; +open MAKETEST, $ARGV[1] or die "Unable to open file: \"$ARGV[1]\". $!\n"; sub var_subst { my ($text, $name, $value) = @_; @@ -47,7 +47,7 @@ while ( defined( $line = ) ) { } if ($dump) { $line =~ s/^ //; - if ( $line =~ /^\s*ADD_TEST\(\S+\s+\S*\/tesh\s/ ) { + if ( $line =~ /^\s*ADD_TEST\(\S+\s+\S*TESH\_COMMAND\}\s/ ) { undef %environ; $config_var = ""; $path = ""; @@ -71,7 +71,7 @@ while ( defined( $line = ) ) { my ( $env_var, $value_var ) = ( $1, $2 ); $environ{$env_var} = $value_var; } - if ( $line =~ /(\S+)\)$/ ) { + if ( $line =~ /(\S+)\s*\)$/ ) { $tesh_file = $1; $tesh_file =~ s/^[^\/\$]/$path\/$&/; $tesh_file =~ s/\${CMAKE_HOME_DIRECTORY}/$proj_dir/g; @@ -96,7 +96,7 @@ while ( defined( $line = ) ) { my ($count) = 0; my ($count_first) = 0; my ($count_second) = 0; - open TESH_FILE, $tesh_file or die "Unable to open $tesh_file $!\n"; + open TESH_FILE, $tesh_file or die "Unable to open tesh file: \"$tesh_file\". $!\n"; my ($input) = ""; my ($l); while ( defined( $l = ) ) {