summaryrefslogtreecommitdiff
path: root/.travis
diff options
context:
space:
mode:
authorMark Kavanagh <mark.b.kavanagh@intel.com>2015-04-08 23:30:06 +0100
committerThomas Graf <tgraf@noironetworks.com>2015-04-13 10:36:12 +0200
commit418d2485aa029015389768bbc2f66a50c6281880 (patch)
treeb9f1e4bd9c070e29559561c831802f26f43cea89 /.travis
parente8fe6ad03aa3d25b5ae99190d5aa065705a1b3c8 (diff)
downloadopenvswitch-418d2485aa029015389768bbc2f66a50c6281880.tar.gz
travis: fix errors
Fix two issues observed in travis scripts: - prepare.sh: add '-E' flag to ensure user environmental variables (for example, URL of the proxy server) are passed to 'sudo' - build.sh: add quotes around compiler variable to fix 'unary operator expected' error [tgraf: Fixed two additional occurrences of missing "] Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/build.sh16
-rwxr-xr-x.travis/prepare.sh10
2 files changed, 13 insertions, 13 deletions
diff --git a/.travis/build.sh b/.travis/build.sh
index b6b701c3a..46c5c4d9a 100755
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -38,9 +38,9 @@ function install_kernel()
function install_dpdk()
{
if [ -n "$DPDK_GIT" ]; then
- git clone $DPDK_GIT dpdk-$1
- cd dpdk-$1
- git checkout v$1
+ git clone $DPDK_GIT dpdk-$1
+ cd dpdk-$1
+ git checkout v$1
else
wget http://www.dpdk.org/browse/dpdk/snapshot/dpdk-$1.tar.gz
tar xzvf dpdk-$1.tar.gz > /dev/null
@@ -68,13 +68,13 @@ fi
if [ "$DPDK" ]; then
if [ -z "$DPDK_VER" ]; then
- DPDK_VER="1.8.0"
+ DPDK_VER="1.8.0"
fi
install_dpdk $DPDK_VER
# Disregard bad function casts until DPDK is fixed
CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build"
-elif [ $CC != "clang" ]; then
+elif [ "$CC" != "clang" ]; then
# DPDK headers currently trigger sparse errors
SPARSE_FLAGS="$SPARSE_FLAGS -Wsparse-error"
fi
@@ -82,11 +82,11 @@ fi
configure_ovs $EXTRA_OPTS $*
# Only build datapath if we are testing kernel w/o running testsuite
-if [ $KERNEL ] && [ ! "$TESTSUITE" ] && [ ! "$DPDK" ]; then
+if [ "$KERNEL" ] && [ ! "$TESTSUITE" ] && [ ! "$DPDK" ]; then
cd datapath
fi
-if [ $CC = "clang" ]; then
+if [ "$CC" = "clang" ]; then
make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
elif [[ $BUILD_ENV =~ "-m32" ]]; then
# Disable sparse for 32bit builds on 64bit machine
@@ -95,7 +95,7 @@ else
make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
fi
-if [ $TESTSUITE ] && [ $CC != "clang" ]; then
+if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
if ! make distcheck; then
# testsuite.log is necessary for debugging.
cat */_build/tests/testsuite.log
diff --git a/.travis/prepare.sh b/.travis/prepare.sh
index cda80c22b..0fd6c2878 100755
--- a/.travis/prepare.sh
+++ b/.travis/prepare.sh
@@ -1,11 +1,11 @@
#!/bin/bash
-sudo apt-get update -qq
-sudo apt-get install -qq libssl-dev llvm-dev
-sudo apt-get install -qq gcc-multilib
+sudo -E apt-get update -qq
+sudo -E apt-get install -qq libssl-dev llvm-dev
+sudo -E apt-get install -qq gcc-multilib
if [ "$DPDK" ]; then
- sudo apt-get install -qq libfuse-dev
+ sudo -E apt-get install -qq libfuse-dev
fi
git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
-cd sparse && make && sudo make install PREFIX=/usr && cd ..
+cd sparse && make && sudo -E make install PREFIX=/usr && cd ..