From 8b3f58c49f7f82e559911226530873068f13db16 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Apr 2017 17:24:25 +0300 Subject: Try to use gdb with core dumps if manaplus binary crashed in ci scripts. --- tools/ci/scripts/runtest.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/ci/scripts/runtest.sh b/tools/ci/scripts/runtest.sh index bfb8d370e..64b27d453 100755 --- a/tools/ci/scripts/runtest.sh +++ b/tools/ci/scripts/runtest.sh @@ -1,6 +1,8 @@ #!/bin/bash export SDL_VIDEODRIVER="dummy" +ulimit -c unlimited -S +rm -rf core* ./src/manaplus --renderer=0 >logs/run.log 2>&1 & export PID=$! @@ -11,7 +13,10 @@ if [ "$?" != 0 ]; then echo "Error: process look like crashed" cat logs/run.log echo "Run with gdb" - gdb -ex=run --args ./src/manaplus + COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) + if [[ -f "$COREFILE" ]]; then + gdb -c "$COREFILE" ./src/manaplus -ex "thread apply all bt" -ex "set pagination 0" -batch + fi exit 1 fi kill -s SIGTERM ${PID} -- cgit v1.2.3-60-g2f50