travis: Fail build if any command in if statement fails.
authorVinson Lee <vlee@freedesktop.org>
Fri, 30 Aug 2019 06:15:29 +0000 (23:15 -0700)
committerVinson Lee <vlee@freedesktop.org>
Sat, 31 Aug 2019 19:20:04 +0000 (12:20 -0700)
Travis is checking the exit code of the entire if statement.

Fixes: 64ffc289be89 ("travis: add MacOS Scons build")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
.travis.yml

index 770ba8dbc2dcaa3d6087fa10b8c6712a95458d1a..97720cf118ac24fa819504878f71952f63e7fd9f 100644 (file)
@@ -53,10 +53,10 @@ install:
 script:
   - if test "x$BUILD" = xmeson; then
       meson _build -Dbuild-tests=true;
-      ninja -C _build;
-      ninja -C _build test;
+      ninja -C _build || travis_terminate 1;
+      ninja -C _build test || travis_terminate 1;
     fi
   - if test "x$BUILD" = xscons; then
-      scons;
-      scons check;
+      scons || travis_terminate 1;
+      scons check || travis_terminate 1;
     fi