]> git.proxmox.com Git - mirror_ovs.git/commitdiff
travis: Fix DPDK build and treat bad-function-cast warning as non-error
authorThomas Graf <tgraf@noironetworks.com>
Thu, 11 Sep 2014 19:34:22 +0000 (21:34 +0200)
committerBen Pfaff <blp@nicira.com>
Thu, 11 Sep 2014 19:37:45 +0000 (12:37 -0700)
A missing " prevented the DPDK build in the matrix from functioning
so far. This patch enables the DPDK build by properly building DPDK
as a single library and by pointing the OVS build to the corresponding
build directory. Also removes the 'make install' as it is not required
and only slows down the build.

Due to incorrect casts in the DPDK headers, we have to disable
bad-function-cast and cast-align warnings as being treated as errors
for now.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Co-authored-by: Daniele Di Proietto <ddiproietto@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
.travis.yml
.travis/build.sh

index fd21e308564485813745c0d3211091db10b800fa..b66f82127151dd6d5ad3a585ed98430db4050ed8 100644 (file)
@@ -8,7 +8,7 @@ before_install: ./.travis/prepare.sh
 env:
   - OPTS="--disable-ssl"
   - TESTSUITE=1 KERNEL=1 OPTS="--with-linux=./linux-3.14.7"
-  - KERNEL=1 DPDK=1 OPTS="--with-dpdk=./dpdk-1.7.0
+  - KERNEL=1 DPDK=1 OPTS="--with-dpdk=./dpdk-1.7.0/build"
 
 script: ./.travis/build.sh $OPTS
 
index 56623eafe30dbcedf12d55d552100c2664dde4ea..0a2396924bf00504163a51eec64b5dfcf3314e7e 100755 (executable)
@@ -3,6 +3,7 @@
 set -o errexit
 
 KERNELSRC=""
+CFLAGS="-Werror"
 
 function install_kernel()
 {
@@ -22,9 +23,9 @@ function install_dpdk()
     tar xzvf dpdk-1.7.0.tar.gz > /dev/null
     cd dpdk-1.7.0
     find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/'
+    sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' config/common_linuxapp
     make config CC=gcc T=x86_64-native-linuxapp-gcc
     make CC=gcc RTE_KERNELDIR=$KERNELSRC
-    sudo make install CC=gcc T=x86_64-native-linuxapp-gcc RTE_KERNELDIR=$KERNELSRC
     echo "Installed DPDK source in $(pwd)"
     cd ..
 }
@@ -38,14 +39,19 @@ if [ "$KERNEL" ] || [ "$DPDK" ]; then
     install_kernel
 fi
 
-[ "$DPDK" ] && install_dpdk
+[ "$DPDK" ] && {
+    install_dpdk
+    # Disregard bad function cassts until DPDK is fixed
+    CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
+}
 
 configure_ovs $*
 
+
 if [ $CC = "clang" ]; then
-    make CFLAGS="-Werror -Wno-error=unused-command-line-argument"
+    make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
 else
-    make CFLAGS="-Werror" C=1
+    make CFLAGS="$CFLAGS" C=1
     [ "$TESTSUITE" ] && make distcheck
 fi