Skip to content

Commit

Permalink
Fix flake of large test run under Travis (#2145)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzentner authored Oct 22, 2020
1 parent c0fd41d commit 1593a94
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,20 @@ ci-job-normal: assert-docker
exit 1; \
done

# Need to be able to access $!, a special bash variable
define LARGE_TEST
pytest --cov=garage --cov-report=xml --reruns 1 -m 'large and not flaky' --durations=20 &
PYTEST_PID=$$!
while ps -p $$PYTEST_PID > /dev/null ; do
echo 'Still running'
sleep 60
done
endef
export LARGE_TEST

ci-job-large: assert-docker
[ ! -f $(MJKEY_PATH) ] || mv $(MJKEY_PATH) $(MJKEY_PATH).bak
pytest --cov=garage --cov-report=xml --reruns 1 -m 'large and not flaky' --durations=20
bash -c "$$LARGE_TEST"
for i in {1..5}; do \
bash <(curl -s https://codecov.io/bash --retry 5) -Z && break \
|| echo 'Retrying...' && sleep 30 && continue; \
Expand Down

0 comments on commit 1593a94

Please sign in to comment.