Add target for the test report as html

pull/11157/head
Anders F Björklund 2021-04-20 12:55:31 +02:00
parent 85443b65e1
commit 5ca89279e6
2 changed files with 6 additions and 0 deletions

1
.gitignore vendored
View File

@ -22,6 +22,7 @@ _cgo_export.*
_testmain.go
test-report.html
coverage.html
*.exe

View File

@ -374,6 +374,11 @@ out/test-report.json: $(SOURCE_FILES) $(GOTEST_FILES)
-coverprofile=out/coverage.out -json > out/test-report.json
out/coverage.out: out/test-report.json
# Generate go test report (from gotest) as a a HTML page
test-report.html: out/test-report.json
$(if $(quiet),@echo " REPORT $@")
$(Q)go-test-report < $< -o $@
# Generate go coverage report (from gotest) as a HTML page
coverage.html: out/coverage.out
$(if $(quiet),@echo " COVER $@")