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 0702b90 commit 46c639c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ 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


Expand Down

0 comments on commit 46c639c

Please sign in to comment.