From b051626cce4a76ac6a843a0f3472c3380d9ed890 Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Thu, 25 May 2023 23:31:39 +0000 Subject: [PATCH] Don't be verbose with tests locally Signed-off-by: Ian Lewis --- Makefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 050202fd4..6a87103d6 100644 --- a/Makefile +++ b/Makefile @@ -26,15 +26,25 @@ node_modules/.installed: package.json package-lock.json .PHONY: unit-test unit-test: ## Runs all unit tests. - go mod vendor - # NOTE: go test builds packages even if there are no tests. - go test -mod=vendor -v ./... + @ # NOTE: go test builds packages even if there are no tests. + @set -e;\ + go mod vendor; \ + extraargs=""; \ + if [ "$(OUTPUT_FORMAT)" == "github" ]; then \ + extraargs="-v"; \ + fi; \ + go test -mod=vendor $$extraeargs ./... .PHONY: regression-test regression-test: ## Runs all regression and unit tests. - go mod vendor - # NOTE: go test builds packages even if there are no tests. - go test -mod=vendor -tags=regression -v -timeout=25m ./... + @ # NOTE: go test builds packages even if there are no tests. + @set -e;\ + go mod vendor; \ + extraargs=""; \ + if [ "$(OUTPUT_FORMAT)" == "github" ]; then \ + extraargs="-v"; \ + fi; \ + go test -mod=vendor -tags=regression $$extraeargs -timeout=25m ./... ## Tools #####################################################################