summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-08-31 00:41:08 +0100
committerGitHub <noreply@github.com>2021-08-31 01:41:08 +0200
commitc0f5da3e1adfe40cafc57de63948ef1878bd75c9 (patch)
tree3af7856d4eb89e2a70dee7727591a3645de313b6
parent87eb82cf52d23bbb9cb9a9039b6d6d897fc7b76c (diff)
downloadgitea-c0f5da3e1adfe40cafc57de63948ef1878bd75c9.tar.gz
gitea-c0f5da3e1adfe40cafc57de63948ef1878bd75c9.zip
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 <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ff03e4c0bb..24d47199a9 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: