diff --git a/.travis.yml b/.travis.yml index 9aa21f009ad7..1ad71445adf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/utils/travis/test_wrapper.sh b/utils/travis/test_wrapper.sh index a74b816dc85e..5405048196f7 100755 --- a/utils/travis/test_wrapper.sh +++ b/utils/travis/test_wrapper.sh @@ -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