Add coverage to go tests

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2021-06-07 13:20:58 +02:00
parent 9aac07fe64
commit b930487dc5
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
dist
*.swp
*.swo
/coverage.out

View File

@ -63,5 +63,9 @@ misspell:
vet:
go vet $(MODULE)/...
COVERAGE_FILE := coverage.out
test:
go test $(MODULE)/...
go test -coverprofile=$(COVERAGE_FILE) $(MODULE)/...
coverage: test
go tool cover -func=$(COVERAGE_FILE)