restore_test_env
runner_test_preprocess
runner_test_run
- use_valgrind
checktestcmd
$DBGCURL
$gdbthis
# timestamp finishing of test command
$timetoolend{$testnum} = Time::HiRes::time();
- return (0, $cmdres, $dumped_core, $CURLOUT, $tool, $disablevalgrind);
+ return (0, $cmdres, $dumped_core, $CURLOUT, $tool, use_valgrind() && !$disablevalgrind);
}
my $dumped_core;
my $CURLOUT;
my $tool;
- my $disablevalgrind;
- ($error, $cmdres, $dumped_core, $CURLOUT, $tool, $disablevalgrind) = singletest_run($testnum);
+ my $usedvalgrind;
+ ($error, $cmdres, $dumped_core, $CURLOUT, $tool, $usedvalgrind) = singletest_run($testnum);
if($error) {
return -2;
}
# restore environment variables that were modified
restore_test_env(0);
- return (0, $cmdres, $CURLOUT, $tool, $disablevalgrind);
+ return (0, $cmdres, $CURLOUT, $tool, $usedvalgrind);
}
1;
#######################################################################
# Verify test succeeded
sub singletest_check {
- my ($testnum, $cmdres, $CURLOUT, $tool, $disablevalgrind)=@_;
+ my ($testnum, $cmdres, $CURLOUT, $tool, $usedvalgrind)=@_;
# Skip all the verification on torture tests
if ($torture) {
}
if($valgrind) {
- if(use_valgrind() && !$disablevalgrind) {
+ if($usedvalgrind) {
if(!opendir(DIR, "$LOGDIR")) {
logmsg "ERROR: unable to read $LOGDIR\n";
# timestamp test result verification end
$ok .= "v";
}
else {
- if($verbose && !$disablevalgrind) {
+ if($verbose) {
logmsg " valgrind SKIPPED\n";
}
$ok .= "-"; # skipped
my $cmdres;
my $CURLOUT;
my $tool;
- my $disablevalgrind;
- ($error, $cmdres, $CURLOUT, $tool, $disablevalgrind) = runner_test_run($testnum);
+ my $usedvalgrind;
+ ($error, $cmdres, $CURLOUT, $tool, $usedvalgrind) = runner_test_run($testnum);
if($error == -1) {
# return a test failure, either to be reported or to be ignored
return $errorreturncode;
#######################################################################
# Verify that the test succeeded
- $error = singletest_check($testnum, $cmdres, $CURLOUT, $tool, $disablevalgrind);
+ $error = singletest_check($testnum, $cmdres, $CURLOUT, $tool, $usedvalgrind);
if($error == -1) {
# return a test failure, either to be reported or to be ignored
return $errorreturncode;