Skip to content

Commit

Permalink
build: update makefile
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
magiconair committed May 24, 2017
1 parent a3a6fba commit f0401ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 '^$$' ./...
Expand Down

0 comments on commit f0401ee

Please sign in to comment.