]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: log ignored but passed tests
authorViktor Szakats <commit@vsz.me>
Thu, 8 Aug 2024 12:42:40 +0000 (14:42 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 13 Aug 2024 23:44:07 +0000 (01:44 +0200)
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

index dccb8463b71615d0adfa712f5591ae9d92f5a8f4..64f6f941a73f88d5cba546a28b5d6167c3d938d4 100755 (executable)
@@ -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);