From db99eacbe9c4276003a8839e69dd26aea7c32d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 19 Oct 2017 22:44:52 +0200 Subject: [PATCH] travis: fail the entire job as soon as one of the run commands exits non-zero. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ed8711565..fa869e720 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,8 @@ before_install: - sudo apt-get install -qq python-pygments qt5-default qt5-qmake qtbase5-dev qtcreator libxml2-utils libpcre3 gdb unzip script: +# fail the entire job as soon as one of the subcommands exist not-zero to save time and resources + - set -e # download clang git, compile cppcheck, run cppcheck on clang code to look for crashes in cppcheck. if this is done, terminate build - if [[ "$CHECK_CLANG" == "yes" ]] && [[ "$CC" == "clang" ]]; then wget "https://github.com/llvm-mirror/clang/archive/bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip" & make -j 4 & wait; unzip bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip > /dev/null; touch /tmp/clang.cppcheck; cd ./clang-bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling --template="{callstack} ({severity}) {message} [{id}]" -iINPUTS -itest/Driver/Inputs/gen-response.c -itest/Index/index-many-logical-ops.c -itest/Sema/many-logical-ops.c -j 2 |& tee /tmp/clang.cppcheck; cd ../ ; echo "CLANG" ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/clang.cppcheck; exit; fi # check llvm as well