wesnoth/utils/travis/test_wrapper.sh
Chris Beck 032d8c1a93 fixup travis test_wrapper.sh
fixes up commit 6695365efb25b329a09f7b191f1ebb851cf44d48
2014-12-28 18:00:41 -05:00

17 lines
395 B
Bash
Executable File

#!/bin/bash
COUNTER=10
./test
ERRORCODE=$?
while [ $COUNTER -gt 0 -a $ERRORCODE -eq 200 ]; do
echo "test gave error code 200 (segfault).. trying again."
COUNTER=$((COUNTER-1))
./test
ERRORCODE=$?
done
if [ $ERRORCODE -eq 200 ]; then
echo "test gave error code 200 ten times. suppressing this error...\n"
ERRORCODE=0
fi
export TEST_ERROR_CODE="$ERRORCODE"
exit $ERRORCODE