diff --git a/hack/ci/logformatter b/hack/ci/logformatter index 4189ae9ff3..2356f634d6 100755 --- a/hack/ci/logformatter +++ b/hack/ci/logformatter @@ -317,6 +317,10 @@ END_HTML # BATS handling. This will recognize num_tests both at start and end if ($line =~ /^1\.\.(\d+)$/) { $looks_like_bats = 1; + # -1 is the "count unknown, expect it at the end" sentinel set + # below. It has to be replaced, not added to. + $bats_count{expected_total} = 0 + if ($bats_count{expected_total} // 0) < 0; $bats_count{expected_total} += $1; undef $looks_like_python; } diff --git a/hack/ci/logformatter.t b/hack/ci/logformatter.t index c43eac3039..597c3bfd66 100755 --- a/hack/ci/logformatter.t +++ b/hack/ci/logformatter.t @@ -483,3 +483,17 @@ ok 4 blah FAILED (failures=1, skipped=1) make: *** [Makefile:616: localapiv2] Error 1