Skip to content

Commit

Permalink
Prevent coverage break (#16887)
Browse files Browse the repository at this point in the history
* 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 <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
  • Loading branch information
zeripath and 6543 authored Aug 30, 2021
1 parent 87eb82c commit c0f5da3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c0f5da3

Please sign in to comment.