Skip to content

Commit

Permalink
Default to non-verbose make test output (cadence-workflow#4010)
Browse files Browse the repository at this point in the history
Test output locally is pretty noisy. Failed test output is already captured by Go, generally that's good enough.
Buildkite logs can be kinda useful though, so the buildkite dockerfile sets VERBOSE=1 to enable it.
  • Loading branch information
Groxx authored Feb 22, 2021
1 parent cf5c9cc commit addbdd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 +=
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions docker/buildkite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit addbdd4

Please sign in to comment.