diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-10-25 19:39:52 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-10-25 19:39:52 +0000 |
commit | b7dd186d3608ae82de103f4e25982047abb816be (patch) | |
tree | 4a7a5b68de31246700954d66bdb2668e22988ab3 | |
parent | 26c1c8b2ad4ff65fdf77a0337821c4c3cfde6f30 (diff) |
When valgrind is disabled in the test file, don't run it at all (as opposed
to running it and ignoring its output).
-rwxr-xr-x | tests/runtests.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index b7a1b4a80..4e6e88387 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -1746,7 +1746,8 @@ sub singletest { $DBGCURL=$CMDLINE; } - if($valgrind) { + my $usevalgrind = $valgrind && ((getpart("verify", "valgrind"))[0] !~ /disable/); + if($usevalgrind) { $CMDLINE = "$valgrind ".$valgrind_tool."--leak-check=yes --num-callers=16 ${valgrind_logfile}=log/valgrind$testnum $CMDLINE"; } @@ -2091,9 +2092,7 @@ sub singletest { if($valgrind) { # this is the valid protocol blurb curl should generate - my @disable= getpart("verify", "valgrind"); - - if($disable[0] !~ /disable/) { + if($usevalgrind) { opendir(DIR, "log") || return 0; # can't open log dir @@ -2121,7 +2120,7 @@ sub singletest { } else { if(!$short) { - logmsg " valgrind SKIPPED"; + logmsg " valgrind SKIPPED\n"; } $ok .= "-"; # skipped } |