if($result) {
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
if(!$short) {
logmsg "\n $testnum: $subject FAILED:\n";
$testnumcheck = $testnum;
# timestamp test preparation start
- $timeprepini{$testnum} = Time::HiRes::time() if($timestats);
+ $timeprepini{$testnum} = Time::HiRes::time();
if($disttests !~ /test$testnum\W/ ) {
logmsg "Warning: test$testnum not present in tests/data/Makefile.inc\n";
unlink($FTPDCMD) if(-f $FTPDCMD);
# timestamp required servers verification start
- $timesrvrini{$testnum} = Time::HiRes::time() if($timestats);
+ $timesrvrini{$testnum} = Time::HiRes::time();
if(!$why) {
$why = serverfortest($testnum);
}
# timestamp required servers verification end
- $timesrvrend{$testnum} = Time::HiRes::time() if($timestats);
+ $timesrvrend{$testnum} = Time::HiRes::time();
my @setenv = getpart("client", "setenv");
if(@setenv) {
}
# timestamp starting of test command
- $timetoolini{$testnum} = Time::HiRes::time() if($timestats);
+ $timetoolini{$testnum} = Time::HiRes::time();
# run the command line we built
if ($torture) {
}
# timestamp finishing of test command
- $timetoolend{$testnum} = Time::HiRes::time() if($timestats);
+ $timetoolend{$testnum} = Time::HiRes::time();
if(!$dumped_core) {
if(-r "core") {
sleep($postcommanddelay) if($postcommanddelay);
# timestamp removal of server logs advisor read lock
- $timesrvrlog{$testnum} = Time::HiRes::time() if($timestats);
+ $timesrvrlog{$testnum} = Time::HiRes::time();
# test definition might instruct to stop some servers
# stop also all servers relative to the given one
if($rc != 0 && !$torture) {
logmsg " postcheck FAILED\n";
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return 1;
}
}
cleardir($LOGDIR);
}
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return $cmdres;
}
"has no name attribute\n";
stopservers($verbose);
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return -1;
}
my @generated=loadarray($filename);
}
logmsg " exit FAILED\n";
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return 1;
}
logmsg "\n** MEMORY FAILURE\n";
logmsg @memdata;
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return 1;
}
else {
unless(opendir(DIR, "$LOGDIR")) {
logmsg "ERROR: unable to read $LOGDIR\n";
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return 1;
}
my @files = readdir(DIR);
if(!$vgfile) {
logmsg "ERROR: valgrind log file missing for test $testnum\n";
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return 1;
}
my @e = valgrindparse("$LOGDIR/$vgfile");
logmsg @e;
}
# timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ $timevrfyend{$testnum} = Time::HiRes::time();
return 1;
}
$ok .= "v";
logmsg "$ok " if(!$short);
+ # timestamp test result verification end
+ $timevrfyend{$testnum} = Time::HiRes::time();
+
my $sofar= time()-$start;
my $esttotal = $sofar/$count * $total;
my $estleft = $esttotal - $sofar;
my $left=sprintf("remaining: %02d:%02d",
$estleft/60,
$estleft%60);
-
+ my $took = $timevrfyend{$testnum} - $timeprepini{$testnum};
+ my $duration = sprintf("duration: %02d:%02d",
+ $sofar/60, $sofar%60);
if(!$automakestyle) {
- logmsg sprintf("OK (%-3d out of %-3d, %s)\n", $count, $total, $left);
+ logmsg sprintf("OK (%-3d out of %-3d, %s, took %.1fs, %s)\n",
+ $count, $total, $left, $took, $duration);
}
else {
logmsg "PASS: $testnum - $testname\n";
cleardir($LOGDIR);
}
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-
return 0;
}