A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
let unit testing stuff build out of source
[simgrid.git]
/
buildtools
/
Cmake
/
generate_memcheck_tests.pl
diff --git
a/buildtools/Cmake/generate_memcheck_tests.pl
b/buildtools/Cmake/generate_memcheck_tests.pl
index
312d8e4
..
0e066e4
100755
(executable)
--- a/
buildtools/Cmake/generate_memcheck_tests.pl
+++ b/
buildtools/Cmake/generate_memcheck_tests.pl
@@
-26,20
+26,25
@@
while(defined($line=<MAKETEST>)) {
last;
}
if($dump) {
last;
}
if($dump) {
- if($line =~ /ADD_TEST/) {
- if($line =~ /ADD_TEST\(([\S]+)\s+.*\/tools\/tesh\/tesh\s*--cd\s*(\S+)\s+(.*)\)$/) {
+ if($line =~ /ADD_TEST/)
+ {
+ if($line =~ /ADD_TEST\(([\S]+)\s+.*\$\{CMAKE_BINARY_DIR\}\/bin\/tesh\s*--cd\s*(\S+)\s+(.*)\)$/)
+ {
my($name_test,$path,$tesh_file)=($1,$2,$3);
$path=~ s/\"//g;
my($complete_tesh_file)=$path."/".$tesh_file;
my($count)=0;
my($count_first)=0;
my($count_second)=0;
my($name_test,$path,$tesh_file)=($1,$2,$3);
$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;
+ $complete_tesh_file =~ s/\$\{CMAKE_BINARY_DIR\}/$proj_dir/g;
+ $complete_tesh_file =~ s/\$\{PROJECT_DIRECTORY\}/$proj_dir/g;
open TESH_FILE, $complete_tesh_file or die "Unable to open $complete_tesh_file $!\n";
my($l);
open TESH_FILE, $complete_tesh_file or die "Unable to open $complete_tesh_file $!\n";
my($l);
- while(defined($l=<TESH_FILE>)) {
+ while(defined($l=<TESH_FILE>))
+ {
chomp $l;
chomp $l;
- if($l =~ /^\$ (.*)$/) {
+ if($l =~ /^\$ (.*)$/)
+ {
my($command) = $1;
$command =~ s/\${srcdir:=.}/./g;
$command =~ s/\${EXEEXT:=}//g;
my($command) = $1;
$command =~ s/\${srcdir:=.}/./g;
$command =~ s/\${EXEEXT:=}//g;
@@
-47,22
+52,33
@@
while(defined($line=<MAKETEST>)) {
$command =~ s/\$SG_TEST_ENV //g;
$command =~ s/\$SG_EXENV_TEST //g;
$command =~ s/\$EXEEXT//g;
$command =~ s/\$SG_TEST_ENV //g;
$command =~ s/\$SG_EXENV_TEST //g;
$command =~ s/\$EXEEXT//g;
+ $command =~ s/\${EXEEXT}//g;
$command =~ s/\${srcdir}/\${PROJECT_DIRECTORY}\/src/g;
$command =~ s/ \$ARGS//g;
$command =~ s/ \$@ //g;
$command =~ s/\${srcdir}/\${PROJECT_DIRECTORY}\/src/g;
$command =~ s/ \$ARGS//g;
$command =~ s/ \$@ //g;
+ $command =~ s/..\/..\/bin\/smpirun/\${CMAKE_BINARY_DIR\}\/bin\/smpirun/g;
+ if($command =~ /^[^\/\$\s]+\//) {
+ $command = $path."/".$command;
+ $command =~ s/\/(.?\/)+/\//g;
+ }
print "ADD_TEST(memcheck-$name_test-$count $command --cd $path\/)\n";
#push @test_list, "memcheck-$name_test-$count";
$count++;
}
print "ADD_TEST(memcheck-$name_test-$count $command --cd $path\/)\n";
#push @test_list, "memcheck-$name_test-$count";
$count++;
}
- if($l =~ /^\& (.*)$/) {
+ if($l =~ /^\& (.*)$/)
+ {
last;
}
}
close(TESH_FILE);
last;
}
}
close(TESH_FILE);
- } else {
+ }
+ else
+ {
next;
}
next;
}
- } else {
+ }
+ else
+ {
print $line."\n";
}
}
print $line."\n";
}
}