aboutsummaryrefslogtreecommitdiff
path: root/.travis
diff options
context:
space:
mode:
authorChun Kuan Lee <ken2812221@gmail.com>2018-12-15 00:14:50 +0800
committerpracticalswift <practicalswift@users.noreply.github.com>2018-12-17 09:24:37 +0100
commit5e5138a721738f47053d915e4c65f925838ad5b4 (patch)
tree293a4c508023d5ebee71536594638b7ef93cebc9 /.travis
parent069752b72613b772a9536a3e7f15fa75097f2946 (diff)
travis: Use trap and set -e errtrace
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/test_06_script.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/.travis/test_06_script.sh b/.travis/test_06_script.sh
index 6883872410..618aa2c3b6 100755
--- a/.travis/test_06_script.sh
+++ b/.travis/test_06_script.sh
@@ -40,20 +40,16 @@ BEGIN_FOLD configure
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
END_FOLD
+set -o errtrace
+trap 'DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"' ERR
+
BEGIN_FOLD build
-DOCKER_EXEC make $MAKEJOBS $GOAL || (
- echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1
- DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"
- false
-)
+DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
END_FOLD
if [ "$RUN_UNIT_TESTS" = "true" ]; then
BEGIN_FOLD unit-tests
- DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1 || (
- DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"
- false
- )
+ DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
END_FOLD
fi
@@ -63,9 +59,6 @@ fi
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
BEGIN_FOLD functional-tests
- DOCKER_EXEC test/functional/test_runner.py --ci --combinedlogslen=4000 --coverage --quiet --failfast ${extended} ${FUNCTIONAL_TESTS_CONFIG} || (
- DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"
- false
- )
+ DOCKER_EXEC test/functional/test_runner.py --ci --combinedlogslen=4000 --coverage --quiet --failfast ${extended} ${FUNCTIONAL_TESTS_CONFIG}
END_FOLD
fi