mirror of
https://github.com/curl/curl.git
synced 2025-02-05 14:30:10 +08:00
runtests: use more consistent failure lines
After a test failure log a consistent log message to make it easier to parse the log file. Also, log a consistent message with "ignored" for failures that cause the test to be not considered at all. These should perhaps be counted in the skipped category, but this commit does not change that behaviour.
This commit is contained in:
parent
69e3485e0d
commit
62a9731533
@ -515,7 +515,7 @@ sub torture {
|
||||
}
|
||||
}
|
||||
if($fail) {
|
||||
logmsg " Failed on function number $limit in test.\n",
|
||||
logmsg " $testnum: torture FAILED: function number $limit in test.\n",
|
||||
" invoke with \"-t$limit\" to repeat this single case.\n";
|
||||
stopservers($verbose);
|
||||
return 1;
|
||||
@ -712,7 +712,7 @@ sub singletest_prepare {
|
||||
my $filename=$fileattr{'name'};
|
||||
if(@inputfile || $filename) {
|
||||
if(!$filename) {
|
||||
logmsg "ERROR: section client=>file has no name attribute\n";
|
||||
logmsg " $testnum: IGNORED: section client=>file has no name attribute\n";
|
||||
return -1;
|
||||
}
|
||||
my $fileContent = join('', @inputfile);
|
||||
@ -846,14 +846,14 @@ sub singletest_run {
|
||||
}
|
||||
|
||||
if(! -f $CMDLINE) {
|
||||
logmsg "The tool set in the test case for this: '$tool' does not exist\n";
|
||||
logmsg " $testnum: IGNORED: The tool set in the test case for this: '$tool' does not exist\n";
|
||||
return (-1, 0, 0, "", "", 0);
|
||||
}
|
||||
$DBGCURL=$CMDLINE;
|
||||
}
|
||||
|
||||
if($fail_due_event_based) {
|
||||
logmsg "This test cannot run event based\n";
|
||||
logmsg " $testnum: IGNORED: This test cannot run event based\n";
|
||||
return (-1, 0, 0, "", "", 0);
|
||||
}
|
||||
|
||||
@ -1026,7 +1026,7 @@ sub singletest_clean {
|
||||
foreach my $server (@killtestservers) {
|
||||
chomp $server;
|
||||
if(stopserver($server)) {
|
||||
logmsg " killserver FAILED\n";
|
||||
logmsg " $testnum: killserver FAILED\n";
|
||||
return 1; # normal error if asked to fail on unexpected alive
|
||||
}
|
||||
}
|
||||
@ -1050,7 +1050,7 @@ sub singletest_postcheck {
|
||||
# Must run the postcheck command in torture mode in order
|
||||
# to clean up, but the result can't be relied upon.
|
||||
if($rc != 0 && !$torture) {
|
||||
logmsg " postcheck FAILED\n";
|
||||
logmsg " $testnum: postcheck FAILED\n";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -1504,13 +1504,16 @@ sub singletest_check {
|
||||
|
||||
my $filename=$hash{'name'};
|
||||
if(!$filename) {
|
||||
logmsg "ERROR: section verify=>file$partsuffix ".
|
||||
logmsg " $testnum: IGNORED: section verify=>file$partsuffix ".
|
||||
"has no name attribute\n";
|
||||
if (runnerac_stopservers($runnerid)) {
|
||||
logmsg "ERROR: runner $runnerid seems to have died\n";
|
||||
} else {
|
||||
|
||||
# TODO: this is a blocking call that will stall the controller,
|
||||
if($verbose) {
|
||||
logmsg "WARNING: blocking call in async function\n";
|
||||
}
|
||||
# but this error condition should never happen except during
|
||||
# development.
|
||||
my ($rid, $unexpected, $logs) = runnerar($runnerid);
|
||||
@ -1596,7 +1599,7 @@ sub singletest_check {
|
||||
logmsg sprintf("\n%s returned $cmdres, when expecting %s\n",
|
||||
(!$tool)?"curl":$tool, $errorcode);
|
||||
}
|
||||
logmsg " exit FAILED\n";
|
||||
logmsg " $testnum: exit FAILED\n";
|
||||
# timestamp test result verification end
|
||||
$timevrfyend{$testnum} = Time::HiRes::time();
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user