X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bb1fb42414ea85e89372f665865fe8c4975ba0ad..9b947e30da1e407e9600d55420e84fca0bb5207f:/buildtools/Cmake/generate_memcheck_tests.pl diff --git a/buildtools/Cmake/generate_memcheck_tests.pl b/buildtools/Cmake/generate_memcheck_tests.pl index bbedb09897..6b1d9a5944 100755 --- a/buildtools/Cmake/generate_memcheck_tests.pl +++ b/buildtools/Cmake/generate_memcheck_tests.pl @@ -14,6 +14,7 @@ my(@test_list)=(); my($line); my($dump)=0; +print "if(enable_memcheck)\n"; while(defined($line=)) { chomp $line; if($line =~ /BEGIN TESH TESTS/) { @@ -31,25 +32,31 @@ while(defined($line=)) { $path=~ s/\"//g; my($complete_tesh_file)=$path."/".$tesh_file; my($count)=0; + my($count_first)=0; + my($count_second)=0; $complete_tesh_file =~ s/\${PROJECT_DIRECTORY}/$proj_dir/g; - open TESH_FILE, $complete_tesh_file or die "Unable to open $complete_tesh_file. $!\n"; + open TESH_FILE, $complete_tesh_file or die "Unable to open $complete_tesh_file $!\n"; my($l); while(defined($l=)) { chomp $l; if($l =~ /^\$ (.*)$/) { - my($command)=$1; - $command =~ s/\${srcdir:=.}/\${PROJECT_DIRECTORY}\/src/g; + my($command) = $1; + $command =~ s/\${srcdir:=.}/./g; $command =~ s/\${EXEEXT:=}//g; $command =~ s/\$SG_TEST_EXENV //g; $command =~ s/\$SG_TEST_ENV //g; + $command =~ s/\$SG_EXENV_TEST //g; $command =~ s/\$EXEEXT//g; $command =~ s/\${srcdir}/\${PROJECT_DIRECTORY}\/src/g; $command =~ s/ \$ARGS//g; - $command =~ s/ \$@ //g; - print "ADD_TEST(memcheck-$name_test-$count $path\/$command)\n"; - push @test_list, "memcheck-$name_test-$count"; + $command =~ s/ \$@ //g; + print "ADD_TEST(memcheck-$name_test-$count $command --cd $path\/)\n"; + #push @test_list, "memcheck-$name_test-$count"; $count++; } + if($l =~ /^\& (.*)$/) { + last; + } } close(TESH_FILE); } else { @@ -61,7 +68,7 @@ while(defined($line=)) { } } close(MAKETEST); - -print "set(MEMCHECK_LIST\n"; -print (join("\n", @test_list)); -print ")\n"; +print "endif(enable_memcheck)\n"; +#print "set(MEMCHECK_LIST\n"; +#print (join("\n", @test_list)); +#print ")\n";