From c0f5da3e1adfe40cafc57de63948ef1878bd75c9 Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 31 Aug 2021 00:41:08 +0100 Subject: [PATCH] Prevent coverage break (#16887) * Prevent coverage break There are repeated failures of our CI due to an intermittent issue with coverage.out finishing with a spurious `0` on a single line. This problem is very annoying and very hard to understand where it is coming from, therefore as the problem appears random and without clear cause we should just strip this line from our coverage. Signed-off-by: Andrew Thornton Co-authored-by: 6543 <6543@obermui.de> --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ff03e4c0b..24d47199a 100644 --- a/Makefile +++ b/Makefile @@ -385,7 +385,9 @@ test\#%: .PHONY: coverage coverage: - GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out coverage.out > coverage.all + grep -v '^0$$' coverage.out > coverage-bodged.out + grep -v '^0$$' integration.coverage.out > integration.coverage-bodged.out + GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1) .PHONY: unit-test-coverage unit-test-coverage: