URL: https://github.com/freeipa/freeipa/pull/380 Author: martbab Title: #380: Travis CI: actually return non-zero exit status when the test job fails Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/380/head:pr380 git checkout pr380
From 1f6a7917a6ff69c6a3ca9ea29ebe5bb0d38786c4 Mon Sep 17 00:00:00 2001 From: Martin Babinsky <mbabi...@redhat.com> 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. --- .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 9fd1c1c..7d050b0 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
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code