mirror of
https://github.com/curl/curl.git
synced 2025-09-12 23:22:42 +03:00
runtests: show name and keywords for failed tests in summary
Useful to see what the numbers listed in the `TESTFAIL:` and `IGNORED:` lines mean. Also list test keywords to help catching failure patterns. Example: ``` FAIL 1034: 'HTTP over proxy with malformatted IDN host name' HTTP, HTTP GET, HTTP proxy, IDN, FAILURE, config file FAIL 1035: 'HTTP over proxy with too long IDN host name' HTTP, HTTP GET, HTTP proxy, IDN, FAILURE TESTFAIL: These test cases failed: 1034 1035 ``` Closes #14174
This commit is contained in:
parent
dfbdcb93ae
commit
bae5553599
|
@ -3039,9 +3039,30 @@ if(%skipped && !$short) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub testnumdetails {
|
||||||
|
my ($desc, $numlist) = @_;
|
||||||
|
foreach my $testnum (split(' ', $numlist)) {
|
||||||
|
if(!loadtest("${TESTDIR}/test${testnum}")) {
|
||||||
|
my @info_keywords = getpart("info", "keywords");
|
||||||
|
my $testname = (getpart("client", "name"))[0];
|
||||||
|
chomp $testname;
|
||||||
|
logmsg "$desc $testnum: '$testname'";
|
||||||
|
my $first = 1;
|
||||||
|
for my $k (@info_keywords) {
|
||||||
|
chomp $k;
|
||||||
|
my $sep = ($first == 1) ? " " : ", ";
|
||||||
|
logmsg "$sep$k";
|
||||||
|
$first = 0;
|
||||||
|
}
|
||||||
|
logmsg "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($total) {
|
if($total) {
|
||||||
if($failedign) {
|
if($failedign) {
|
||||||
my $failedignsorted = numsortwords($failedign);
|
my $failedignsorted = numsortwords($failedign);
|
||||||
|
testnumdetails("FAIL-IGNORED", $failedignsorted);
|
||||||
logmsg "IGNORED: failed tests: $failedignsorted\n";
|
logmsg "IGNORED: failed tests: $failedignsorted\n";
|
||||||
}
|
}
|
||||||
logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
|
logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
|
||||||
|
@ -3049,6 +3070,7 @@ if($total) {
|
||||||
|
|
||||||
if($failed && ($ok != $total)) {
|
if($failed && ($ok != $total)) {
|
||||||
my $failedsorted = numsortwords($failed);
|
my $failedsorted = numsortwords($failed);
|
||||||
|
testnumdetails("\nFAIL", $failedsorted);
|
||||||
logmsg "\nTESTFAIL: These test cases failed: $failedsorted\n\n";
|
logmsg "\nTESTFAIL: These test cases failed: $failedsorted\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user