Skip to content

Commit

Permalink
fixup travis segfault handling in test executable
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jul 5, 2014
1 parent 464b596 commit 56dc1c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -40,6 +40,10 @@ script:
- if [[ "$WML_TESTS" = true ]]; then time ./run_wml_tests -v -t "$WML_TEST_TIME"; fi
after_failure:
- if [ -f "errors.log" ]; then echo -e "\n*** \n*\n* Errors reported in wml unit tests, here is errors.log...\n*\n*** \n"; cat errors.log; fi
- if [ "$TEST_ERROR_CODE" = 200]; then echo -e "\n***\n*\n* Encountered a segfault in the c++ unit test executable, attempting to get a backtrace in the remaining time...\n*\n***\n"; fi
- if [ "$TEST_ERROR_CODE" = 200]; then time sudo apt-get install -qq gdb; fi
- if [ "$TEST_ERROR_CODE" = 200]; then time scons build=debug extra_flags_debug="$EXTRA_FLAGS_RELEASE" test; fi
- if [ "$TEST_ERROR_CODE" = 200]; then time gdb --eval-command=start --eval-command=continue --eval-command=bt --eval-command=quit --args ./test-debug; fi
notifications:
email: false
irc:
Expand Down
3 changes: 2 additions & 1 deletion utils/travis/test_wrapper.sh
Expand Up @@ -3,9 +3,10 @@ COUNTER=10
./test
ERRORCODE=$?
while [ $COUNTER -gt 0 -a $ERRORCODE -eq 200 ]; do
echo "test apparently timed out with error code 200... trying again."
echo "test gave error code 200 (segfault).. trying again."
COUNTER=$((COUNTER-1))
./test
ERRORCODE=$?
done
export TEST_ERROR_CODE=$ERRORCODE
exit $ERRORCODE

0 comments on commit 56dc1c2

Please sign in to comment.