travis reruns ./test in case of error code 200, 10 times max

This is to combat what are apparently transient timeout faults
where the travis workers choke on running ./test and never
actually start the process... it seems not even to get to the
"running 140 tests" message when it ends with error code 200.
This commit is contained in:
Chris Beck 2014-05-26 16:04:10 -04:00
parent cec797bcb4
commit 96d616eb4d
2 changed files with 12 additions and 1 deletions

View file

@ -9,7 +9,7 @@ script:
- scons cxxtool=$CXX strict=True wesnoth wesnothd campaignd test
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- ./test
- ./test_wrapper.sh
- ./run_wml_tests -u -t 15
after_failure:
- ./travis_after_failure.sh

11
test_wrapper.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
COUNTER=10
./test
ERRORCODE=$?
while [ $COUNTER -gt 0 -a $ERRORCODE -eq 200 ]; do
echo "test apparently timed out with error code 200... trying again."
let COUNTER = COUNTER - 1
./test
ERRORCODE=$?
done
exit $ERRORCODE