From 60469c0ef9b49953771e5aac3280a0ccf3a2dd4b Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Tue, 28 Apr 2015 19:02:46 -0700 Subject: [PATCH] Add a script to handle coverage go test cannot gather coverage numbers for multiple packages https://github.com/golang/go/issues/6909 This script wraps go test to generate report for each package and then combine them in one file --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 970e87da70..47ff0b32f0 100644 --- a/Makefile +++ b/Makefile @@ -32,9 +32,7 @@ cover: @go tool cover 2>/dev/null; if [ $$? -eq 3 ]; then \ go get -u golang.org/x/tools/cmd/cover; \ fi - godep go test $(TEST) -coverprofile=coverage.out - godep go tool cover -html=coverage.out - rm coverage.out + ./scripts/coverage.sh --html # vet runs the Go source code static analysis tool `vet` to find # any common errors.