X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1ad68dab15ca87309f47ce7e3e0d3d0624ac4e1c..dda91eacaae468bcab4a7e4d28c9a1c1afc34951:/tools/tesh/tesh.pl diff --git a/tools/tesh/tesh.pl b/tools/tesh/tesh.pl index 07bd7698be..cce9144a07 100755 --- a/tools/tesh/tesh.pl +++ b/tools/tesh/tesh.pl @@ -370,7 +370,15 @@ sub exec_cmd { ### # exec the command line - my @cmdline = quotewords( '\s+', 0, $cmd{'cmd'} ); + my @cmdline; + if(defined $ENV{VALGRIND_COMMAND}) { + push @cmdline, $ENV{VALGRIND_COMMAND}; + push @cmdline, split(" ", $ENV{VALGRIND_COMMAND_OPTIONS}); + if($cmd{'timeout'} ne 'no'){ + $cmd{'timeout'}=$cmd{'timeout'}*20 + } + } + push @cmdline, quotewords( '\s+', 0, $cmd{'cmd'} ); my $input = defined($cmd{'in'})? join("\n",@{$cmd{'in'}}) : ""; my $output = " " x 10240; $output = ""; # Preallocate 10kB, and reset length to 0 $cmd{'got'} = \$output;