Skip to content

Commit

Permalink
fix: make tests fail on non-zero status
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Aug 7, 2020
1 parent a7d9596 commit a0227bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ test: deps install
@for d in $$(go list ./... | grep -v vendor | grep -v examples); \
do \
go test -race -coverprofile=profile.out -covermode=atomic $$d; \
if [ $$? != 0 ]; then \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | tail -n +2 >> coverage.txt; \
rm profile.out; \
fi; \
done; \

go tool cover -func coverage.txt


testrace:
go test -race $(TEST) $(TESTARGS)

Expand Down

0 comments on commit a0227bb

Please sign in to comment.