mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
build: simplify coverage display
This commit is contained in:
3
Makefile
3
Makefile
@@ -199,8 +199,7 @@ test-coverage-go: ; $(info $(M) running Go coverage tests…) @ ## Run Go covera
|
||||
$Q $(GO) tool cover -html=test/go/profile.out -o test/go/coverage.html
|
||||
$Q $(GOCOV) convert test/go/profile.out | $(GOCOVXML) > test/go/coverage.xml
|
||||
@printf "Code coverage: "; \
|
||||
c=$$(echo "scale=1;$$(sed -En 's/^<coverage line-rate="([0-9.]+)".*/\1/p' test/go/coverage.xml) * 100 / 1" | bc -q) ; \
|
||||
echo $$c ; [ $$c != 0 ]
|
||||
go tool cover -func test/go/profile.out | awk '($$1 == "total:") { print $$NF}'
|
||||
|
||||
test-js: .fmt-js~ .lint-js~ $(GENERATED_JS)
|
||||
test-js: ; $(info $(M) running JS tests…) @ ## Run JS tests
|
||||
|
||||
Reference in New Issue
Block a user