From: Vincent Bernat Date: Tue, 15 Mar 2016 07:26:34 +0000 (+0100) Subject: travis: move install/run steps into tests/ci X-Git-Tag: 0.9.2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8bb212d9c5970f509d53733092c8826de5fc0862;p=thirdparty%2Flldpd.git travis: move install/run steps into tests/ci They are not specific to Travis. --- diff --git a/.travis.yml b/.travis.yml index b14ec1f7..958f6cc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ os: linux compiler: gcc sudo: require install: - - ./.travis/install.sh + - ./tests/ci/install.sh script: - - ./.travis/run.sh + - ./tests/ci/run.sh env: global: - secure: "1qAHFxnz0gIxMMl9DAVzoPvVSpOacWT2G6ItcaoaVe1r4OANzpoHBlbyHX2I/1KFe+BohzjS9kXA4NrlPaL81qfvu9E6qZ9yai/+0gHdzZttB2uvdyFXyDVye3CHHDlYMfRRQf6C+eYs5CKeedWq9Q3arO1GyAWiL9RcW1466sg=" diff --git a/.travis/run.sh b/.travis/run.sh deleted file mode 100755 index 70c10f9f..00000000 --- a/.travis/run.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -set -e - -case "${RUN_COVERITY}","${TRAVIS_BRANCH}" in - 0,"${COVERITY_SCAN_BRANCH_PATTERN}") - exit 0 - ;; - 1,"${COVERITY_SCAN_BRANCH_PATTERN}") - # OK - ;; - 1,*) - exit 0 - ;; -esac - -./autogen.sh -./configure $LLDPD_CONFIG_ARGS --enable-pie CFLAGS="-O0 -g" - -if [ x"${RUN_COVERITY}" = x"1" ]; then - # Coverity build - [ x"${COVERITY_SCAN_TOKEN}" = x"" ] || \ - curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | \ - COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG" \ - COVERITY_SCAN_BUILD_COMMAND="make CFLAGS=-Werror" \ - bash -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 - fi -fi diff --git a/.travis/install.sh b/tests/ci/install.sh similarity index 51% rename from .travis/install.sh rename to tests/ci/install.sh index d758d5ab..6d08abac 100755 --- a/.travis/install.sh +++ b/tests/ci/install.sh @@ -1,21 +1,7 @@ #!/bin/sh -# Setup dev environment for Travis - set -e -case "${RUN_COVERITY}","${TRAVIS_BRANCH}" in - 0,"${COVERITY_SCAN_BRANCH_PATTERN}") - exit 0 - ;; - 1,"${COVERITY_SCAN_BRANCH_PATTERN}") - # OK - ;; - 1,*) - exit 0 - ;; -esac - case "$(uname -s)" in Darwin) # OS X @@ -30,9 +16,5 @@ 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 ;; esac diff --git a/tests/ci/run.sh b/tests/ci/run.sh new file mode 100755 index 00000000..1e216bf0 --- /dev/null +++ b/tests/ci/run.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +# Handle coverity scan +case "${RUN_COVERITY}","${TRAVIS_BRANCH}" in + 0,"${COVERITY_SCAN_BRANCH_PATTERN}") + exit 0 + ;; + 1,"${COVERITY_SCAN_BRANCH_PATTERN}") + [ x"${COVERITY_SCAN_TOKEN}" = x"" ] || \ + curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | \ + COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG" \ + COVERITY_SCAN_BUILD_COMMAND="make CFLAGS=-Werror" \ + bash + exit $? + ;; + 1,*) + exit 0 + ;; +esac + +./autogen.sh +./configure $LLDPD_CONFIG_ARGS --enable-pie CFLAGS="-O0 -g" +make all check CFLAGS=-Werror +make distcheck