Skip to content

Commit 9b5b713

Browse files
author
Martin Babinsky
committed
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 <[email protected]>
1 parent d15ccde commit 9b5b713

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.travis_run_task.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ ipa-docker-test-runner -l $CI_RESULTS_LOG \
4747
--git-repo $TRAVIS_BUILD_DIR \
4848
$TASK_TO_RUN $test_set
4949

50-
if $?
50+
exit_status="$?"
51+
52+
if [[ "$exit_status" -ne 0 ]]
5153
then
5254
truncate_log_to_test_failures
5355
fi
56+
57+
exit $exit_status

0 commit comments

Comments
 (0)