Skip to content

Commit

Permalink
Makefile: remove tparse -follow and -test.v from GOTEST_BASE
Browse files Browse the repository at this point in the history
tparse -follow will echo all stdio generated during all tests, which gets
rather verbose in CI. Without -follow, tparse doesn't generate any output
until all tests have run, which causes Travis to abort the job after 10
minutes without interactivity.

tparse has recently gained the -progress option that emits PASS/FAIL lines
after each package finishes its tests. Use this instead of the overly
verbose -follow.

Signed-off-by: Timo Beckers <[email protected]>
  • Loading branch information
ti-mo committed Jun 14, 2023
1 parent fbbf042 commit a82f0fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ install_clang
export PATH="/usr/local/clang/bin:$PATH"

go install github.com/mattn/goveralls@a36c7ef8f23b2952fa6e39663f52107dfc8ad69d # v0.0.11
go install github.com/mfridman/tparse@a20c511a88b880dc2544d77d8bc2cc66a8dec507 # v0.10.3
go install github.com/mfridman/tparse@28967170dce4f9f13de77ec857f7aed4c4294a5f # v0.12.3 (main) with -progress
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TESTPKGS ?= ./...
SWAGGER_VERSION := v0.30.3
SWAGGER := $(CONTAINER_ENGINE) run -u $(shell id -u):$(shell id -g) --rm -v $(CURDIR):$(CURDIR) -w $(CURDIR) --entrypoint swagger quay.io/goswagger/swagger:$(SWAGGER_VERSION)

GOTEST_BASE := -test.v -timeout 600s
GOTEST_BASE := -timeout 600s
GOTEST_COVER_OPTS += -coverprofile=coverage.out
BENCH_EVAL := "."
BENCH ?= $(BENCH_EVAL)
Expand Down
6 changes: 3 additions & 3 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ GO_TAGS_FLAGS = osusergo
GOTEST_COVER_OPTS =

# By default, just print go test output immediately to the terminal. If tparse
# is installed, use it to format the output. This is either silent silent (V=0)
# or gives some signal about ongoing progress by teeing to the terminal (V=1).
# is installed, use it to format the output. Use -progress instead of -follow,
# as the latter is too verbose for most of the test suite.
GOTEST_FORMATTER ?= cat
ifneq ($(shell command -v tparse),)
GOTEST_COVER_OPTS += -json
GOTEST_FORMATTER = tparse
ifneq ($(V),0)
GOTEST_FORMATTER += -follow
GOTEST_FORMATTER += -progress
endif
endif

Expand Down

0 comments on commit a82f0fc

Please sign in to comment.