summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2017-08-10 16:41:19 -0400
committerBen Pfaff <blp@ovn.org>2017-08-10 13:46:25 -0700
commit2904883c27a5804c8377363c2706e6842c6bf3c7 (patch)
treeb9c4d9d7212ef537c74ffa40addde4973b0feb12
parentfc56f5e0f5fa2e185430a2c90df06d06b677bbd5 (diff)
downloadopenvswitch-2904883c27a5804c8377363c2706e6842c6bf3c7.tar.gz
travis: parallel builds and tests
Some recent travis builds have failed due to having exceeded the per-job time limit of 50 minutes. This change enables parallel builds and parallel test execution in order to reduce overall execution time, and will hopefully allow this class of build failures to be avoided. Since the travis build environment is provisioned with two CPUs, use -j2 for builds and -j4 for tests. Testing in a cloned repository shows slightly more than a 50% reduction in overall test time. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rwxr-xr-x.travis/linux-build.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index d6f610ea1..bc7c7087d 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -102,16 +102,16 @@ if [ "$KERNEL" ] && [ ! "$TESTSUITE" ] && [ ! "$DPDK" ]; then
fi
if [ "$CC" = "clang" ]; then
- make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
+ make -j2 CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
elif [[ $BUILD_ENV =~ "-m32" ]]; then
# Disable sparse for 32bit builds on 64bit machine
- make CFLAGS="$CFLAGS $BUILD_ENV"
+ make -j2 CFLAGS="$CFLAGS $BUILD_ENV"
else
- make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
+ make -j2 CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
fi
if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
- if ! make distcheck RECHECK=yes; then
+ if ! make distcheck TESTSUITEFLAGS=-j4 RECHECK=yes; then
# testsuite.log is necessary for debugging.
cat */_build/tests/testsuite.log
exit 1