diff --git a/.travis.yml b/.travis.yml index 5a02d7c9e..7c4849514 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,14 +29,10 @@ before_script: - npm install - bash get-or-build-pill.sh # https://github.com/travis-ci/travis-ci/issues/2570 -- ulimit -c unlimited -S script: -# || true so we continue -- npm run -s test || RESULT=$? -- if [[ ${RESULT} -eq 0 ]]; then exit 0; else for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb urbit core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done; fi; -- echo "build failed with status code $RESULT" -- exit $RESULT +- ulimit -c unlimited -S +- npm run -s test; bash print-core-backtrace.sh $? before_deploy: "[ -d piers ] || { mkdir piers && tar cvzSf piers/zod-$TRAVIS_COMMIT.tgz zod/; }" diff --git a/.travis/print-core-backtrace.sh b/.travis/print-core-backtrace.sh new file mode 100644 index 000000000..52b421525 --- /dev/null +++ b/.travis/print-core-backtrace.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -euo pipefail +set -x + +RESULT=$1 + +if [[ ${RESULT} -eq 0 ]]; then + exit 0 +else + for i in $(find ./ -maxdepth 1 -name 'core*' -print) + do + gdb urbit core* -ex "thread apply all bt" -ex "set pagination 0" -batch + done +fi + +echo "build failed with status code $RESULT" +exit $RESULT