From: Vincent Bernat Date: Wed, 16 Mar 2016 19:37:29 +0000 (+0100) Subject: travis: run integration tests on Linux X-Git-Tag: 0.9.2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62f9ab5ed98baf9093973297710d2f6b892ee835;p=thirdparty%2Flldpd.git travis: run integration tests on Linux After some tweaks, they seem to work as expected. --- diff --git a/.travis.yml b/.travis.yml index 958f6cc6..0f68e88c 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/tests/ci/install.sh b/tests/ci/install.sh index 6d08abac..62700e18 100755 --- a/tests/ci/install.sh +++ b/tests/ci/install.sh @@ -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 diff --git a/tests/ci/run.sh b/tests/ci/run.sh index 1e216bf0..1e11f4f5 100755 --- a/tests/ci/run.sh +++ b/tests/ci/run.sh @@ -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 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