From 31e31aa9dd59668d3dee1569111ac0a793c68a61 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 13 Apr 2021 15:06:30 -0600 Subject: 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 and make logformatter recognize it. Signed-off-by: Ed Santiago --- contrib/cirrus/logformatter | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'contrib/cirrus') 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; -- cgit v1.2.3-54-g00ecf