From ffb9d3b340509f22f9d7cff6b00bfea9a800574e Mon Sep 17 00:00:00 2001 From: Paul Banks Date: Tue, 20 Feb 2018 15:32:44 +0000 Subject: [PATCH] Only output sparse lines to keep Travis happy while logging verbosely to disk --- GNUmakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 2e8bb12d4..77e6c4f5e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -67,7 +67,11 @@ test: other-consul dev-build vet @echo "--> Running go test" @rm -f test.log exit-code go test -tags '$(GOTAGS)' -i ./... - { go test $(GOTEST_FLAGS) -tags '$(GOTAGS)' -timeout 5m -v ./... 2>&1 ; echo $$? > exit-code ; } | tee test.log + @# Dump verbose output to test.log so we can surface test names on failure but + @# hide it from travis as it exceeds their log limits and causes job to be + @# terminated (over 4MB and over 10k lines in the UI). We need to output + @# _something_ to stop them terminating us due to inactivity... + { go test $(GOTEST_FLAGS) -tags '$(GOTAGS)' -timeout 5m ./... 2>&1 ; echo $$? > exit-code ; } | tee test.log | grep -p '^\(ok\|FAIL\)\s*github.com/hashicorp/consul' @echo "Exit code: $$(cat exit-code)" >> test.log @grep -A5 'DATA RACE' test.log || true @grep -A10 'panic: test timed out' test.log || true