Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Also remove reference to variable ARGS in generate_memcheck_tests.pl.
[simgrid.git] / buildtools / Cmake / generate_memcheck_tests.pl
index 6ee5e4c..23699bb 100755 (executable)
@@ -46,7 +46,7 @@ while ( defined( $line = <MAKETEST> ) ) {
         last;
     }
     if ($dump) {
-        if ( $line =~ /ADD_TEST\(\S+\s+\S*\/tesh\s/ ) {
+        if ( $line =~ /^\s*ADD_TEST\(\S+\s+\S*\/tesh\s/ ) {
             $srcdir     = "";
             $bindir     = "";
             $config_var = "";
@@ -79,8 +79,9 @@ while ( defined( $line = <MAKETEST> ) ) {
                 $tesh_file =~ s/^[^\/\$]/$path\/$&/;
                 $tesh_file =~ s/\${CMAKE_HOME_DIRECTORY}/$proj_dir/g;
                 if ( ! -e "$tesh_file" ) {
-                    print "tesh_file : $tesh_file not exists!\n";
-                    die;
+                    print "# tesh_file: $tesh_file does not exist!\n";
+                    print "# $line\n";
+                    next;
                 }
             }
 
@@ -109,7 +110,6 @@ while ( defined( $line = <MAKETEST> ) ) {
                     $command = var_subst($command, "SG_TEST_EXENV", "");
                     $command = var_subst($command, "SG_TEST_ENV", "");
                     $command = var_subst($command, "SG_EXENV_TEST", "");
-                    $command = var_subst($command, "ARGS", "");
                     $command =~ s/\$@//g;
 #                    $command =~ s/..\/..\/bin\/smpirun/\${CMAKE_BINARY_DIR\}\/bin\/smpirun/g;
                     $command =~ s/^\s+//;
@@ -130,7 +130,7 @@ while ( defined( $line = <MAKETEST> ) ) {
             }
             close(TESH_FILE);
         }
-        elsif ( $line =~ /set_tests_properties/ ) {
+        elsif ( $line =~ /^\s*set_tests_properties/ ) {
             if ( $line =~ /set_tests_properties\(([\S]+)/ ) {
                 my ($name_temp) = ($1);
                 $line =~ s/$name_temp/memcheck-$name_temp-0/g;