1
0

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
This commit is contained in:
Abhishek Chanda 2015-04-28 19:02:46 -07:00
parent 2eb6a4bda9
commit 60469c0ef9

View File

@ -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.