travis: Install pip to install pytest in "all" tests
authorMartin Willi <martin@revosec.ch>
Wed, 18 Mar 2015 13:28:17 +0000 (14:28 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 18 Mar 2015 13:29:45 +0000 (14:29 +0100)
This allows ./configure to detect py.test, and execute python unit tests we
provide in the vici python egg.

.travis.yml
scripts/test.sh

index c7f0e84..46e7cfd 100644 (file)
@@ -8,6 +8,7 @@ before_install:
   - sudo apt-get update -qq
   - sudo apt-get install -qq bison flex gperf gettext
   - ./scripts/test.sh deps
+  - ./scripts/test.sh pydeps
 
 script:
   - ./autogen.sh
index 19a6c8d..d21deae 100755 (executable)
@@ -52,7 +52,8 @@ all)
        DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev
                  libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev
                  libnm-glib-dev libnm-glib-vpn-dev libpcsclite-dev libpam0g-dev
-                 binutils-dev libunwind7-dev libjson0-dev iptables-dev"
+                 binutils-dev libunwind7-dev libjson0-dev iptables-dev python-pip"
+       PYDEPS="pytest"
        ;;
 win*)
        CONFIG="--disable-defaults --enable-svc --enable-ikev2
@@ -95,6 +96,11 @@ if test "$1" = "deps"; then
        exit $?
 fi
 
+if test "$1" = "pydeps"; then
+       test -z "$PYDEPS" || sudo pip -q install $PYDEPS
+       exit $?
+fi
+
 CONFIG="$CONFIG
        --enable-silent-rules
        --enable-test-vectors