From 09f1c3afd5bc94610b8a07561d816eddb2f40d7b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 26 Aug 2015 21:57:47 +0300 Subject: Show errors in travis tests after server crashed or terminated with non zero exit code. --- travis.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/travis.sh b/travis.sh index 1b97b7666..a21e9fcb0 100755 --- a/travis.sh +++ b/travis.sh @@ -92,7 +92,8 @@ EOF ARGS="--load-script npc/dev/test.txt " ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt" echo "Running Hercules with command line: ./map-server --run-once $ARGS" - ASAN_OPTIONS=detect_leaks=0 ./map-server --run-once $ARGS 2>runlog.txt || aborterror "Test failed." + ASAN_OPTIONS=detect_leaks=0 ./map-server --run-once $ARGS 2>runlog.txt + export errcode=$? export teststr=$(cat runlog.txt) if [[ -n "${teststr}" ]]; then echo "Sanitizer errors found." @@ -101,6 +102,10 @@ EOF else echo "No sanitizer errors found." fi + if [ ${errcode} -ne 0 ] + echo "server terminated with exit code ${errcode}" + aborterror "Test failed" + fi ;; getplugins) echo "Cloning plugins repository..." -- cgit v1.2.3-60-g2f50