summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-23 03:30:05 -0700
committerKonstantin Käfer <mail@kkaefer.com>2014-10-23 03:30:05 -0700
commit3b397c56ed2b851b07bca3a7c7d38cb0e7cb53f3 (patch)
tree2b415860ef698cac9f5001d9855833efb2d0a871 /scripts
parent10cb83579feb53e7524ec899c0bff19161877669 (diff)
downloadqtlocation-mapboxgl-3b397c56ed2b851b07bca3a7c7d38cb0e7cb53f3.tar.gz
print core dumps on application crashes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_tests.sh18
-rwxr-xr-xscripts/travis_before_install.sh2
2 files changed, 18 insertions, 2 deletions
diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh
index dd9ee3f260..e9952e46be 100755
--- a/scripts/run_tests.sh
+++ b/scripts/run_tests.sh
@@ -3,8 +3,24 @@
set -e
set -o pipefail
+# allow writing core files
+ulimit -c unlimited -S
+
cd build/${BUILDTYPE:-Release}
for TEST in ./test_* ; do
- ${TEST}
+ RESULT=0
+ ${TEST} || RESULT=$?
+
+ # output core dump if we got one
+ for DUMP in $(find ./ -maxdepth 1 -name 'core*' -print); do
+ gdb ${TEST} ${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
done
diff --git a/scripts/travis_before_install.sh b/scripts/travis_before_install.sh
index 1ecfc4f26b..fefd6937f2 100755
--- a/scripts/travis_before_install.sh
+++ b/scripts/travis_before_install.sh
@@ -19,7 +19,7 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
sudo apt-get -y install gcc-4.8 g++-4.8
mapbox_time "install_build_tools" \
- sudo apt-get -y install git build-essential zlib1g-dev automake \
+ sudo apt-get -y install git build-essential zlib1g-dev automake gdb \
libtool xutils-dev make cmake pkg-config python-pip \
libboost1.55-dev libboost-regex1.55-dev libcurl4-openssl-dev \
libpng-dev libsqlite3-dev