From 1cdd7ef86955670aa84e8a80596a9556311dce3f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 1 Jul 2017 14:15:12 +0200 Subject: [PATCH] Travis: use exit code 1 for failures, not errors (#1887) Using exit code != 1 (e.g. 2 as with "make") appears to cause Travis to consider the build job as an error ("!"), instead of a failure ("X"). Example build: https://travis-ci.org/awesomeWM/awesome/builds/248484247 !: https://travis-ci.org/awesomeWM/awesome/jobs/248484252 Test finished successfully There were 3 errors! make[4]: *** [CMakeFiles/check-integration] Error 1 make[3]: *** [CMakeFiles/check-integration.dir/all] Error 2 make[2]: *** [CMakeFiles/check-integration.dir/rule] Error 2 make[1]: *** [check-integration] Error 2 make: *** [check-integration] Error 2 ++return X: https://travis-ci.org/awesomeWM/awesome/jobs/248484250 Test finished successfully There were 3 errors! --- .travis.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e4f161e..4078e8ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -142,7 +142,7 @@ install: travis_run_in_fold() { travis_fold_start "$1" shift - "$@" || return + "$@" || return 1 travis_fold_end return 0 } @@ -189,15 +189,14 @@ script: && cmake $CMAKE_ARGS ..) do_codecov samples - (make check-unit-coverage \ - && do_codecov unittests \ - && tests/run.sh \ - && do_codecov functionaltests \ - && gcov $(find -name '*.o') \ - && do_codecov_gcov c_code) - ret=$? + make check-unit-coverage + do_codecov unittests + tests/run.sh + do_codecov functionaltests + gcov $(find -name '*.o') + do_codecov_gcov c_code + travis_fold_end - [ "$ret" = 0 ] else travis_run_in_fold "make.check-unit" make check-unit travis_run_in_fold "make.check-integration" make check-integration