Add cover tasks to test code coverage

This commit is contained in:
Mitchell Hashimoto 2015-02-16 09:58:17 -08:00
parent 8db6f722d2
commit e60a614a37
1 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,14 @@ updatedeps:
| sort -u \ | sort -u \
| xargs go get -f -u -v | xargs go get -f -u -v
cover:
@go tool cover 2>/dev/null; if [ $$? -eq 3 ]; then \
go get -u golang.org/x/tools/cmd/cover; \
fi
go test $(TEST) -coverprofile=coverage.out
go tool cover -html=coverage.out
rm coverage.out
# vet runs the Go source code static analysis tool `vet` to find # vet runs the Go source code static analysis tool `vet` to find
# any common errors. # any common errors.
vet: vet: