summaryrefslogtreecommitdiff
path: root/.travis/osx-build.sh
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-03-23 16:04:47 -0400
committerBen Pfaff <blp@ovn.org>2016-03-23 13:17:58 -0700
commit40a75bbf9e8237ddf0bfc9d3320bfc39e389c7eb (patch)
tree39de76c4f2c68309b0fe81355e7e6d74ea3cffe5 /.travis/osx-build.sh
parent837351e6f99098d63628bd06afe908b6d4af755d (diff)
downloadopenvswitch-40a75bbf9e8237ddf0bfc9d3320bfc39e389c7eb.tar.gz
travis: support OS X builds
Add support for travis-ci OS X builds: - Add linux- prefix to existing build/prepare scripts - Create new OS X flavored build/prepare scripts - Update .travis.yml for OS X At this time only one build job included in the matrix for OS X. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to '.travis/osx-build.sh')
-rwxr-xr-x.travis/osx-build.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/.travis/osx-build.sh b/.travis/osx-build.sh
new file mode 100755
index 000000000..4db9c8d04
--- /dev/null
+++ b/.travis/osx-build.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -o errexit
+
+CFLAGS="-Werror -Wno-error=format $CFLAGS"
+EXTRA_OPTS=""
+
+function configure_ovs()
+{
+ ./boot.sh && ./configure $*
+}
+
+configure_ovs $EXTRA_OPTS $*
+
+if [ "$CC" = "clang" ]; then
+ make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
+else
+ make CFLAGS="$CFLAGS $BUILD_ENV"
+fi
+if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
+ if ! make distcheck RECHECK=yes; then
+ # testsuite.log is necessary for debugging.
+ cat */_build/tests/testsuite.log
+ exit 1
+ fi
+fi
+
+exit 0