diff --git a/Makefile b/Makefile index 51e490f9bc1..4f56d5e8b84 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,15 @@ MAKEFLAGS += --no-builtin-rules .SUFFIXES: +# set a VERBOSE=1 env var for verbose output. VERBOSE=0 (or unset) disables. +# this is used to make verbose flags, suitable for `$(if $(test_v),...)`. +VERBOSE ?= 0 +ifneq (0,$(VERBOSE)) +test_v = 1 +else +test_v = +endif + # a literal space value, for makefile purposes SPACE := SPACE += @@ -16,7 +25,7 @@ GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) TEST_TIMEOUT = 20m -TEST_ARG ?= -race -v -timeout $(TEST_TIMEOUT) +TEST_ARG ?= -race $(if $(test_v),-v) -timeout $(TEST_TIMEOUT) BUILD := .build BIN := $(BUILD)/bin TOOLS_CMD_ROOT=./cmd/tools diff --git a/docker/buildkite/Dockerfile b/docker/buildkite/Dockerfile index 8e6c3335117..4cbbb15cb28 100644 --- a/docker/buildkite/Dockerfile +++ b/docker/buildkite/Dockerfile @@ -22,6 +22,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN pip install -U 'pip<21' RUN pip install PyYAML==3.13 cqlsh==5.0.4 +# verbose test output from `make`, can be disabled with VERBOSE=0 +ENV VERBOSE=1 + # https://github.com/docker-library/golang/blob/c1baf037d71331eb0b8d4c70cff4c29cf124c5e0/1.4/Dockerfile RUN mkdir -p /cadence WORKDIR /cadence