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
Signed-off-by: Mark Kavanagh <[email protected]> --- .travis/build.sh | 4 ++-- .travis/prepare.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis/build.sh b/.travis/build.sh index b6fe0eb..b341429 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -74,7 +74,7 @@ if [ "$DPDK" ]; then # Support older versions of GCC CFLAGS="-mssse3" 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 @@ -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 cda80c2..0fd6c28 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 .. -- 1.9.3 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
