From b0a50c7fd8e1b2576e5c95ccb2dd502f5cc79ef9 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 13 Mar 2016 20:51:03 +0100 Subject: [PATCH] travis: try to run integration tests --- .travis.yml | 1 + .travis/install.sh | 7 +++---- .travis/run.sh | 19 ++++++++----------- tests/integration/requirements.txt | 1 - 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index b14ec1f7..b3a161d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: c os: linux +dist: trusty compiler: gcc sudo: require install: diff --git a/.travis/install.sh b/.travis/install.sh index d758d5ab..ea699232 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -30,9 +30,8 @@ case "$(uname -s)" in libsnmp-dev libxml2-dev libjansson-dev \ libevent-dev libreadline-dev libbsd-dev \ check - [ x"$RUN_INTEGRATION" != x"1" ] || \ - sudo apt-get -qqy install \ - vde2 iproute qemu \ - bridge-utils busybox + python3 -V && \ + python3 -m pip -V && \ + sudo -H $(which python3) -m pip install -r tests/integration/requirements.txt ;; esac diff --git a/.travis/run.sh b/.travis/run.sh index 70c10f9f..1678bb84 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -15,7 +15,7 @@ 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" if [ x"${RUN_COVERITY}" = x"1" ]; then # Coverity build @@ -27,15 +27,12 @@ if [ x"${RUN_COVERITY}" = x"1" ]; then else # Regular build make all check CFLAGS=-Werror - if [ x"$RUN_INTEGRATION" = x"1" ]; then - cd tests - sudo setfacl -m u:$(id -un):r /boot/vmlinuz-* - make integration-tests - sh integration-tests - else - make distcheck - if [ x"$TRAVIS_OS_NAME" = x"osx" ]; then - make -C osx pkg - fi + make distcheck + if [ x"$TRAVIS_OS_NAME" = x"osx" ]; then + make -C osx pkg + fi + if [ x"$TRAVIS_OS_NAME" = x"linux" ]; then + cd tests/integration + sudo $(which python3) -m pytest -n 5 -vvv -x --boxed fi fi diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt index 85d02781..9528dae7 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -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 -- 2.39.5