diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-27 17:24:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-27 17:24:25 +0300 |
commit | 8b3f58c49f7f82e559911226530873068f13db16 (patch) | |
tree | 88e8efc2f6f3e4d982cfb39446990adbcdc90518 /tools/ci/scripts/runtest.sh | |
parent | ca38553de32bf046f939319d7703d984ea8fc956 (diff) | |
download | mv-8b3f58c49f7f82e559911226530873068f13db16.tar.gz mv-8b3f58c49f7f82e559911226530873068f13db16.tar.bz2 mv-8b3f58c49f7f82e559911226530873068f13db16.tar.xz mv-8b3f58c49f7f82e559911226530873068f13db16.zip |
Try to use gdb with core dumps if manaplus binary crashed in ci scripts.
Diffstat (limited to 'tools/ci/scripts/runtest.sh')
-rwxr-xr-x | tools/ci/scripts/runtest.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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} |