aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4a388a05d..d73915acd 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,18 @@ testk8s: deps
testk8s-setup: deps
go test -v ./middleware/kubernetes/... -run TestKubernetes
+.PHONY: coverage
+coverage: deps
+ set -e -x
+ echo "" > coverage.txt
+ for d in `go list ./... | grep -v vendor`; do \
+ go test -race -coverprofile=profile.out -covermode=atomic $$d; \
+ if [ -f profile.out ]; then \
+ cat profile.out >> coverage.txt; \
+ rm profile.out; \
+ fi; \
+ done
+
.PHONY: clean
clean:
go clean