From 946428134e6cc9bbc68ba209b5e11f68189f3d1d Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 24 May 2017 11:26:49 +0200 Subject: [PATCH] build: update makefile * capture all output to test.log only and print only failures * always print output on travis * test github.com/hashicorp/consul/consul separately until we've found the interactions with the other packages during testing. --- GNUmakefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 41c3c7d45..f4baed39b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -48,7 +48,10 @@ cov: test: dev go test -tags "$(GOTAGS)" -i -run '^$$' ./... - ( set -o pipefail ; go test -tags "$(GOTAGS)" -v ./... 2>&1 | tee test.log ) + go test -tags "$(GOTAGS)" -v $$(go list ./... | egrep -v '(consul/consul|vendor)') > test.log 2>&1 || true + go test -tags "$(GOTAGS)" -v github.com/hashicorp/consul/consul >> test.log 2>&1 || true + @if [ "$$TRAVIS" == "true" ] ; then cat test.log ; fi + @if grep -q 'FAIL:' test.log ; then grep 'FAIL:' test.log ; exit 1 ; else echo 'PASS' ; fi test-race: dev go test -tags "$(GOTAGS)" -i -run '^$$' ./...