From 1a444e3153c739de45f5d97aeb9d52c0ddd4d978 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 8 Aug 2024 14:42:40 +0200 Subject: [PATCH] runtests: log ignored but passed tests List tests explicitly ignored, but passing. It can be useful to catch ignore rules that are no longer necessary because the tests are not failing anymore. To not clutter the default view, hide this information under a GitHub Actions foldable group. Closes #14457 --- tests/runtests.pl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index dccb8463b7..64f6f941a7 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -144,6 +144,8 @@ my %disabled; # disabled test cases my %ignored; # ignored results of test cases my %ignoretestcodes; # if test results are to be ignored +my $passedign; # tests passed with results ignored + my $timestats; # time stamping and stats generation my $fullstats; # show time stats for every single test my %timeprepini; # timestamp for each test preparation start @@ -1776,6 +1778,8 @@ sub singletest_success { } if($errorreturncode==2) { + # ignored test success + $passedign .= "$testnum "; logmsg "Warning: test$testnum result is ignored, but passed!\n"; } } @@ -3079,10 +3083,18 @@ sub testnumdetails { } if($total) { + if($passedign) { + my $sorted = numsortwords($passedign); + logmsg "::group::Passed Ignored Test details\n"; + testnumdetails("PASSED-IGNORED", $sorted); + logmsg "IGNORED: passed tests: $sorted\n"; + logmsg "::endgroup::\n"; + } + if($failedign) { - my $failedignsorted = numsortwords($failedign); - testnumdetails("FAIL-IGNORED", $failedignsorted); - logmsg "IGNORED: failed tests: $failedignsorted\n"; + my $sorted = numsortwords($failedign); + testnumdetails("FAIL-IGNORED", $sorted); + logmsg "IGNORED: failed tests: $sorted\n"; } logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n", $ok/$total*100); -- 2.47.3