mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 03:29:43 +00:00
Avoid travis to fail with flacky tests
This commit is contained in:
parent
bd76a34002
commit
817a69edad
@ -160,6 +160,11 @@ test: other-consul dev-build vet
|
||||
@# _something_ to stop them terminating us due to inactivity...
|
||||
{ go test $(GOTEST_FLAGS) -tags '$(GOTAGS)' -timeout 7m $(GOTEST_PKGS) 2>&1 ; echo $$? > exit-code ; } | tee test.log | egrep '^(ok|FAIL)\s*github.com/hashicorp/consul'
|
||||
@echo "Exit code: $$(cat exit-code)" >> test.log
|
||||
@if [ "0" != "$$(cat exit-code)" ]; then \
|
||||
echo Retrying to avoid flacky tests >> test.log;\
|
||||
echo Retrying tests once...;\
|
||||
go test $(GOTEST_FLAGS) -tags '$(GOTAGS)' -timeout 5m $(GOTEST_PKGS) 2>&1; echo $$? > exit-code;\
|
||||
fi
|
||||
@# This prints all the race report between ====== lines
|
||||
@awk '/^WARNING: DATA RACE/ {do_print=1; print "=================="} do_print==1 {print} /^={10,}/ {do_print=0}' test.log || true
|
||||
@grep -A10 'panic: ' test.log || true
|
||||
|
Loading…
x
Reference in New Issue
Block a user