From a9937bef6de0651db8fed09dc7f0095b1264b919 Mon Sep 17 00:00:00 2001 From: Pierre LALET Date: Wed, 9 Nov 2016 11:25:17 +0100 Subject: [PATCH] Travis CI: fix install & tests --- .travis/install.sh | 10 +++++++--- .travis/test.sh | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 79f41dd7f..ee97c6d53 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,7 +1,11 @@ # Install dependencies using pip -if [ -z $TRAVIS_SUDO ] && [ "$TRAVIS_OS_NAME" = "osx" ] -then - PIP_INSTALL_FLAGS="--user" +if [ -z "$TRAVIS_SUDO" -o "$TRAVIS_SUDO" = "false" ] +then + TRAVIS_SUDO="" + if [ "$TRAVIS_OS_NAME" = "osx" ] + then + PIP_INSTALL_FLAGS="--user" + fi fi $TRAVIS_SUDO pip install $PIP_INSTALL_FLAGS ecdsa mock diff --git a/.travis/test.sh b/.travis/test.sh index 870559a87..10f6e1487 100644 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -1,10 +1,11 @@ # Dump Scapy config python -c "from scapy.all import *; print conf" -# Don't run tests that requires root privileges -if [ -z $TRAVIS_SUDO ] +# Don't run tests that require root privileges +if [ -z "$TRAVIS_SUDO" -o "$TRAVIS_SUDO" = "false" ] then UT_FLAGS="-K netaccess " + TRAVIS_SUDO="" fi # Test AEAD modes in IPSec if available