Skip to content

Commit 872c0b6

Browse files
committed
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 <[email protected]>
1 parent 73394f4 commit 872c0b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ test\#%:
385385

386386
.PHONY: coverage
387387
coverage:
388-
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out coverage.out > coverage.all
388+
grep -v '^0$'coverage.out > coverage-bodged.out
389+
grep -v '^0$'integration.coverage.out > integration.coverage-bodged.out
390+
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)
389391

390392
.PHONY: unit-test-coverage
391393
unit-test-coverage:

0 commit comments

Comments
 (0)