From 70d0fd0d52f4deac18132cc80672aab6d31bb06f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 28 Aug 2018 14:09:05 -0400 Subject: [PATCH] ci: run tests up to 5 times before failing when travis is throttling resourcse more than usual (resources are dynamically allocated since we are not using a paid service), it can be the case that tests fail even more than usual. this number may need to be increased further if 5 does not provide enough reliability Differential Revision: https://phab.enlightenment.org/D6920 --- .ci/ci-make-check.sh | 6 ++++-- .ci/distcheck.sh | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.ci/ci-make-check.sh b/.ci/ci-make-check.sh index 4ecf5b5a38..edb1752810 100755 --- a/.ci/ci-make-check.sh +++ b/.ci/ci-make-check.sh @@ -10,12 +10,14 @@ if [ "$1" = "misc" ] || [ "$1" = "misc-disabled" ] ; then exit 0 fi +NUM_TRIES=5 + travis_fold check "make check-TESTS" if [ "$DISTRO" != "" ] ; then - for tries in 1 2 3 ; do + for tries in $(seq 1 ${NUM_TRIES}); do (docker exec --env EINA_LOG_BACKTRACE="0" --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make -j2 -C src/ check-TESTS) && break docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) cat src/test-suite.log - if [ $tries != 3 ] ; then echo "tests failed, trying again!" ; fi + if [ $tries != ${NUM_TRIES} ] ; then echo "tests failed, trying again!" ; fi false done #else diff --git a/.ci/distcheck.sh b/.ci/distcheck.sh index afc4fe1835..8c8e7cdf97 100755 --- a/.ci/distcheck.sh +++ b/.ci/distcheck.sh @@ -70,10 +70,11 @@ travis_endfold check-build travis_fold check-TESTS check-TESTS set +e export EINA_LOG_BACKTRACE="0" -for tries in 1 2 3 ; do +NUM_TRIES=5 +for tries in $(seq 1 ${NUM_TRIES}); do make ${AM_MAKEFLAGS} -C src/ -j1 check-TESTS && break cat src/test-suite.log - if [ $tries != 3 ] ; then echo "tests failed, trying again!" ; continue ; fi + if [ $tries != ${NUM_TRIES} ] ; then echo "tests failed, trying again!" ; continue ; fi exit 1 done travis_endfold check-TESTS