From 9b5b7131502a73fa24dc56c72a9648528c5aceee Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Mon, 9 Jan 2017 12:27:36 +0100 Subject: [PATCH] Travis CI: actually return non-zero exit status when the test job fails The original code did not actually propagate the test runner exit status to parent process so Travis CI job was always green. Reviewed-By: Stanislav Laznicka --- .travis_run_task.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis_run_task.sh b/.travis_run_task.sh index 9fd1c1cb8..7d050b0b6 100755 --- a/.travis_run_task.sh +++ b/.travis_run_task.sh @@ -47,7 +47,11 @@ ipa-docker-test-runner -l $CI_RESULTS_LOG \ --git-repo $TRAVIS_BUILD_DIR \ $TASK_TO_RUN $test_set -if $? +exit_status="$?" + +if [[ "$exit_status" -ne 0 ]] then truncate_log_to_test_failures fi + +exit $exit_status