diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-04-29 09:03:17 -0400 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-07-02 15:23:34 -0700 |
commit | 4870bccabaf952ae076850e550ca232526695510 (patch) | |
tree | fbc4e0739b2d2426594604d7fbf5327f268e0845 /scripts/run_tests.sh | |
parent | f74bc9d8ceff754200d4e8d922a1a0107403db2b (diff) | |
download | qtlocation-mapboxgl-4870bccabaf952ae076850e550ca232526695510.tar.gz |
Use gdb to get backtraces
Core dumps don't work on Travis docker containers.
Diffstat (limited to 'scripts/run_tests.sh')
-rwxr-xr-x | scripts/run_tests.sh | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index e4c9e77eac..b8691caa44 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -24,21 +24,5 @@ if [ ! -d "test/node_modules/express" ]; then (cd test; npm install express@4.11.1) fi -RESULT=0 -${CMD} "$@" || RESULT=$? - -if [[ ${RESULT} != 0 ]]; then - echo "The program crashed with exit code ${RESULT}. We're now trying to output the core dump." -fi - -# output core dump if we got one -for DUMP in $(find ./ -maxdepth 1 -name 'core*' -print); do - gdb ${CMD} ${DUMP} -ex "thread apply all bt" -ex "set pagination 0" -batch - rm -rf ${DUMP} -done - -# now we should present travis with the original -# error code so the run cleanly stops -if [[ ${RESULT} != 0 ]]; then - exit $RESULT -fi +gdb -batch -return-child-result -ex 'set print thread-events off' \ + -ex 'run' -ex 'thread apply all bt' ${CMD} |