diff options
author | Ed Santiago <santiago@redhat.com> | 2021-04-13 15:06:30 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-04-13 15:18:34 -0600 |
commit | 31e31aa9dd59668d3dee1569111ac0a793c68a61 (patch) | |
tree | feedc7a93e24c52dc0f779307779710c0d6dc5ea /contrib/cirrus/logformatter | |
parent | 21d6b12689cc38823fef3772327990f9692d4379 (diff) | |
download | podman-31e31aa9dd59668d3dee1569111ac0a793c68a61.tar.gz podman-31e31aa9dd59668d3dee1569111ac0a793c68a61.tar.bz2 podman-31e31aa9dd59668d3dee1569111ac0a793c68a61.zip |
compose test: try to get useful data from flakes
docker-compose test continues to flake even after #9961.
Let's try to get some useful data from the failures, by:
* adding -S (--show-error) to curl. With just -s (--silent),
curl is completely quiet. With -S, it displays errors.
(Not in TAP form, but I'm OK with that)
* oops, adding safety checks to the fix from #9961 (it
was inadvertently clobbering the curl exit status)
And, as long as I'm in this code: logformatter was not
highlighting these results, because the '1..N' TAP line
needs to be spit out at the end. Have test-compose emit
a 'TAP' header <http://testanything.org/> and make
logformatter recognize it.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib/cirrus/logformatter')
-rwxr-xr-x | contrib/cirrus/logformatter | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 3fa0e5618..5156f9f8a 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -243,11 +243,17 @@ END_HTML $cirrus_task = $1; } - # BATS handling (used also for apiv2 tests, which emit TAP output) - if ($line =~ /^1\.\.(\d+)$/ || $line =~ m!/test-apiv2!) { + # BATS handling. This will recognize num_tests both at start and end + if ($line =~ /^1\.\.(\d+)$/) { $looks_like_bats = 1; $bats_count{expected_total} = $1; } + # Since the number of tests can't always be predicted, recognize + # some leading text strings that indicate BATS output to come. + elsif ($line =~ /^TAP\s+version\s/ || $line =~ m!/test-apiv2!) { + $looks_like_bats = 1; + $bats_count{expected_total} = -1; # Expect to be overridden at end! + } if ($looks_like_bats) { my $css; |