From 872c0b6deaa5ac0ec1cdc2ca6388f42968aa00c5 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Mon, 30 Aug 2021 21:20:38 +0100 Subject: [PATCH 1/3] 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 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ff03e4c0bbcd7..d4ab321ddff62 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: From 4ff736fa31c5df4c2c4c3c17ac3ca155ca5908ce Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Mon, 30 Aug 2021 21:46:11 +0100 Subject: [PATCH 2/3] agh Signed-off-by: Andrew Thornton --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d4ab321ddff62..86b6891c44f29 100644 --- a/Makefile +++ b/Makefile @@ -385,8 +385,8 @@ test\#%: .PHONY: coverage coverage: - grep -v '^0$'coverage.out > coverage-bodged.out - grep -v '^0$'integration.coverage.out > integration.coverage-bodged.out + 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 From f2dca7cc516ac51bdab9470730d2747030c0f75c Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 31 Aug 2021 01:17:49 +0200 Subject: [PATCH 3/3] we have to escape $ --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 86b6891c44f29..24d47199a939a 100644 --- a/Makefile +++ b/Makefile @@ -385,8 +385,8 @@ test\#%: .PHONY: coverage coverage: - grep -v '^0$' coverage.out > coverage-bodged.out - grep -v '^0$' integration.coverage.out > integration.coverage-bodged.out + 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