Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
generate_memcheck_tests.pl: correctly skip commented lines.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 31 Jan 2012 15:44:49 +0000 (16:44 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 31 Jan 2012 15:45:04 +0000 (16:45 +0100)
buildtools/Cmake/generate_memcheck_tests.pl

index 6ee5e4c..ad85011 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 = "";
@@ -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;