diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-23 03:30:05 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-23 03:30:05 -0700 |
commit | 3b397c56ed2b851b07bca3a7c7d38cb0e7cb53f3 (patch) | |
tree | 2b415860ef698cac9f5001d9855833efb2d0a871 /scripts | |
parent | 10cb83579feb53e7524ec899c0bff19161877669 (diff) | |
download | qtlocation-mapboxgl-3b397c56ed2b851b07bca3a7c7d38cb0e7cb53f3.tar.gz |
print core dumps on application crashes
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/run_tests.sh | 18 | ||||
-rwxr-xr-x | scripts/travis_before_install.sh | 2 |
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 |