forked from mirror/gin
ci: break when test fail (#1671)
This commit is contained in:
parent
98c7ac7202
commit
cce49582d6
|
@ -3,3 +3,5 @@ vendor/*
|
||||||
coverage.out
|
coverage.out
|
||||||
count.out
|
count.out
|
||||||
test
|
test
|
||||||
|
profile.out
|
||||||
|
tmp.out
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -14,7 +14,12 @@ install: deps
|
||||||
test:
|
test:
|
||||||
echo "mode: count" > coverage.out
|
echo "mode: count" > coverage.out
|
||||||
for d in $(TESTFOLDER); do \
|
for d in $(TESTFOLDER); do \
|
||||||
$(GO) test -v -covermode=count -coverprofile=profile.out $$d; \
|
$(GO) test -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \
|
||||||
|
cat tmp.out; \
|
||||||
|
if grep -q "^--- FAIL" tmp.out; then \
|
||||||
|
rm tmp.out; \
|
||||||
|
exit 1;\
|
||||||
|
fi; \
|
||||||
if [ -f profile.out ]; then \
|
if [ -f profile.out ]; then \
|
||||||
cat profile.out | grep -v "mode:" >> coverage.out; \
|
cat profile.out | grep -v "mode:" >> coverage.out; \
|
||||||
rm profile.out; \
|
rm profile.out; \
|
||||||
|
|
Loading…
Reference in New Issue