]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
travis: run integration tests on Linux
authorVincent Bernat <vincent@bernat.im>
Wed, 16 Mar 2016 19:37:29 +0000 (20:37 +0100)
committerVincent Bernat <vincent@bernat.im>
Wed, 16 Mar 2016 21:09:32 +0000 (22:09 +0100)
After some tweaks, they seem to work as expected.

.travis.yml
tests/ci/install.sh
tests/ci/run.sh
tests/integration/requirements.txt

index 958f6cc605ac969e1ceb6aecaf313829270b0f6d..0f68e88ca08c57cf61feccb48e9e34e70d189b79 100644 (file)
@@ -1,5 +1,6 @@
 language: c
 os: linux
+dist: trusty
 compiler: gcc
 sudo: require
 install:
index 6d08abace8384e476dad543582a8906cf319ebeb..62700e18c0d4477b820b8013c9343d85901d5a10 100755 (executable)
@@ -8,7 +8,7 @@ case "$(uname -s)" in
         brew update
         brew install libevent jansson libxml2 check net-snmp
         ;;
-    *)
+    Linux)
         # Linux
         sudo apt-get -qqy update
         sudo apt-get -qqy install \
@@ -16,5 +16,7 @@ case "$(uname -s)" in
             libsnmp-dev libxml2-dev libjansson-dev \
             libevent-dev libreadline-dev libbsd-dev \
             check
+        # For integration tests
+        sudo -H $(which python3) -m pip install -r tests/integration/requirements.txt
         ;;
 esac
index 1e216bf0c733947febd865ba1f10e07780f4613b..1e11f4f52d2b6bc03e3333e21103b4fec81e1a26 100755 (executable)
@@ -21,6 +21,18 @@ case "${RUN_COVERITY}","${TRAVIS_BRANCH}" in
 esac
 
 ./autogen.sh
-./configure $LLDPD_CONFIG_ARGS --enable-pie CFLAGS="-O0 -g"
+./configure $LLDPD_CONFIG_ARGS --enable-pie --localstatedir=/var --sysconfdir=/etc --prefix=/usr CFLAGS="-O0 -g"
 make all check CFLAGS=-Werror
 make distcheck
+
+case "$(uname -s)" in
+    Darwin)
+        # Create a package
+        make -C osx pkg
+        ;;
+    Linux)
+        # Integration tests
+        cd tests/integration
+        sudo $(which python3) -m pytest -n 5 -vvv --boxed
+        ;;
+esac
index 85d027814d036b78a51711c311e07376c2154400..9528dae7cf3b6668fb1ea1e3873cff74699599cb 100644 (file)
@@ -1,6 +1,5 @@
 apipkg==1.4
 execnet==1.4.1
-pkg-resources==0.0.0
 py==1.4.31
 pyroute2==0.3.16
 pytest==2.9.0