]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
travis: test "make install" and "make dist" on macOS
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 28 Feb 2018 12:27:38 +0000 (12:27 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 28 Feb 2018 17:53:23 +0000 (17:53 +0000)
We can't use "make distcheck" on macOS because many unit tests fail. We
can still get coverage of some of the things "distcheck" validates, by
running the "install" and "dist" targets. This is particularly useful
because many conditional features are disabled on macOS, and this helps
make sure we can still successfully install & dist when these bits are
disabled.

The default script is getting unreadable since it is all on one long
line. Rather than adding further conditional clauses to it, we make
use of the travis matrix config override for the script.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
.travis.yml

index 0cfdf809509ed55b296af34364c89e899b136170..282cb223b010f500af1faebfb043483a7bd030e5 100644 (file)
@@ -10,6 +10,11 @@ matrix:
       dist: trusty
     - compiler: clang
       os: osx
+      script:
+        # We can't run make distcheck/syntax-check because they
+        # fail on macOS, but doing 'install' and 'dist' gives us
+        # some useful coverage
+        - make -j3 && make -j3 install && make -j3 dist
 
 addons:
   apt:
@@ -88,15 +93,13 @@ env:
     - VIR_TEST_DEBUG=1
 
 before_install:
-  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew upgrade && brew install rpcgen yajl; fi
+  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew upgrade && brew install rpcgen yajl xz; fi
 
 before_script:
-  - ./autogen.sh
+  - ./autogen.sh --prefix=$(pwd)/install-root
 
 script:
-  # Many unit tests still fail on macOS, and there are a bunch of issues with
-  # syntax-check as well, so skip those steps on that platform for now
-  - make -j3 && if [ "$TRAVIS_OS_NAME" != "osx" ]; then make -j3 syntax-check && make -j3 distcheck; fi
+  - make -j3 && make -j3 syntax-check && make -j3 distcheck
 
 after_failure:
   - echo '============================================================================'