From 3c3fcd60ece5b5b8901b8a229968002d53449ead Mon Sep 17 00:00:00 2001 From: Lukas Pioch Date: Sat, 18 Mar 2017 21:36:01 +0100 Subject: Catch crash if any and print backtrace from every thread --- .travis.yml | 1 + CIbuild.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 60632e3ac..104722267 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ addons: - ubuntu-toolchain-r-test packages: - g++-4.8 + - gdb script: ./CIbuild.sh diff --git a/CIbuild.sh b/CIbuild.sh index 93c238b4c..2bfe2036d 100755 --- a/CIbuild.sh +++ b/CIbuild.sh @@ -17,11 +17,14 @@ echo "Building..." make -j 2; make -j 2 test ARGS="-V"; +# Create .gdbinit in home directory. Switches off the confirmation on quit +echo -e "define hook-quit\n\tset confirm off\nend\n" > ~/.gdbinit + echo "Testing..." cd Server/; touch apiCheckFailed.flag if [ "$TRAVIS_CUBERITE_BUILD_TYPE" != "COVERAGE" ]; then - $CUBERITE_PATH << EOF + gdb -return-child-result -ex run -ex "bt" -ex "info threads" -ex "thread apply all bt" -ex "quit" --args $CUBERITE_PATH << EOF load APIDump apicheck restart -- cgit v1.2.3