diff options
author | Andrei Karas <akaras@inbox.ru> | 2020-06-05 09:13:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2020-06-16 03:43:42 +0300 |
commit | 4f21b8d169f762608680a1f98f0b4dbc73a3f405 (patch) | |
tree | 808a1044257f6c53d7595127a0df2d4ddf603b63 /tools | |
parent | 4223930c595f2d6b7ef7734da7290686ec6cdbf7 (diff) | |
download | hercules-4f21b8d169f762608680a1f98f0b4dbc73a3f405.tar.gz hercules-4f21b8d169f762608680a1f98f0b4dbc73a3f405.tar.bz2 hercules-4f21b8d169f762608680a1f98f0b4dbc73a3f405.tar.xz hercules-4f21b8d169f762608680a1f98f0b4dbc73a3f405.zip |
Show runlog.txt on libconfig tests crash
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci/travis.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 10c653925..489e15bc7 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -71,7 +71,8 @@ function run_server { function run_test { echo "Running: test_$1" sysctl -w kernel.core_pattern=core || true - ./test_$1 2>runlog.txt + rm -rf core* || true + CRASH_PLEASE=1 ./test_$1 2>runlog.txt export errcode=$? export teststr=$(head -c 10000 runlog.txt) if [[ -n "${teststr}" ]]; then @@ -83,6 +84,13 @@ function run_test { fi if [ ${errcode} -ne 0 ]; then echo "test $1 terminated with exit code ${errcode}" + echo cat runlog.txt + cat runlog.txt + echo crash dump + COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) + if [[ -f "$COREFILE" ]]; then + gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch + fi aborterror "Test failed" fi } |