summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-04-29 09:03:17 -0400
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-07-02 15:23:34 -0700
commit4870bccabaf952ae076850e550ca232526695510 (patch)
treefbc4e0739b2d2426594604d7fbf5327f268e0845 /scripts
parentf74bc9d8ceff754200d4e8d922a1a0107403db2b (diff)
downloadqtlocation-mapboxgl-4870bccabaf952ae076850e550ca232526695510.tar.gz
Use gdb to get backtraces
Core dumps don't work on Travis docker containers.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_tests.sh20
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}