summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-25 00:40:12 +0300
committerAndrei Karas <akaras@inbox.ru>2019-03-03 05:27:06 +0300
commitab72d50b10b382d1256ccef6c945df0e1562b4a8 (patch)
tree8d371f03caf570c0b2c99d7b59c0864397c9c459 /tools
parent3b2fffae9f65bf064f7ab66a697196fd75550127 (diff)
downloadhercules-ab72d50b10b382d1256ccef6c945df0e1562b4a8.tar.gz
hercules-ab72d50b10b382d1256ccef6c945df0e1562b4a8.tar.bz2
hercules-ab72d50b10b382d1256ccef6c945df0e1562b4a8.tar.xz
hercules-ab72d50b10b382d1256ccef6c945df0e1562b4a8.zip
Show crash dump in travis
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/travis.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh
index fa7d5be93..22f523bdf 100755
--- a/tools/ci/travis.sh
+++ b/tools/ci/travis.sh
@@ -47,7 +47,8 @@ function aborterror {
function run_server {
echo "Running: $1 --run-once $2"
- $1 --run-once $2 2>runlog.txt
+ rm -rf core* || true
+ CRASH_PLEASE=1 $1 --run-once $2 2>runlog.txt
export errcode=$?
export teststr=$(head -c 10000 runlog.txt)
if [[ -n "${teststr}" ]]; then
@@ -59,12 +60,17 @@ function run_server {
fi
if [ ${errcode} -ne 0 ]; then
echo "server $1 terminated with exit code ${errcode}"
+ 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
}
function run_test {
echo "Running: test_$1"
+ sysctl -w kernel.core_pattern=core || true
./test_$1 2>runlog.txt
export errcode=$?
export teststr=$(head -c 10000 runlog.txt)