mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
show verbose test output to prevent circleci kills
This commit is contained in:
parent
a4016d35ce
commit
0a0bc68e95
2
Makefile
2
Makefile
@ -114,7 +114,7 @@ check-licenses:
|
|||||||
.PHONY: unit
|
.PHONY: unit
|
||||||
unit: ## Run unit tests (with coverage)
|
unit: ## Run unit tests (with coverage)
|
||||||
$(call title,Running unit tests)
|
$(call title,Running unit tests)
|
||||||
go test -coverprofile $(COVER_REPORT) ./...
|
go test -v -coverprofile $(COVER_REPORT) ./...
|
||||||
@go tool cover -func $(COVER_REPORT) | grep total | awk '{print substr($$3, 1, length($$3)-1)}' > $(COVER_TOTAL)
|
@go tool cover -func $(COVER_REPORT) | grep total | awk '{print substr($$3, 1, length($$3)-1)}' > $(COVER_TOTAL)
|
||||||
@echo "Coverage: $$(cat $(COVER_TOTAL))"
|
@echo "Coverage: $$(cat $(COVER_TOTAL))"
|
||||||
@if [ $$(echo "$$(cat $(COVER_TOTAL)) >= $(COVERAGE_THRESHOLD)" | bc -l) -ne 1 ]; then echo "$(RED)$(BOLD)Failed coverage quality gate (> $(COVERAGE_THRESHOLD)%)$(RESET)" && false; fi
|
@if [ $$(echo "$$(cat $(COVER_TOTAL)) >= $(COVERAGE_THRESHOLD)" | bc -l) -ne 1 ]; then echo "$(RED)$(BOLD)Failed coverage quality gate (> $(COVERAGE_THRESHOLD)%)$(RESET)" && false; fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user