]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
travis: move install/run steps into tests/ci
authorVincent Bernat <vincent@bernat.im>
Tue, 15 Mar 2016 07:26:34 +0000 (08:26 +0100)
committerVincent Bernat <vincent@bernat.im>
Tue, 15 Mar 2016 07:27:30 +0000 (08:27 +0100)
They are not specific to Travis.

.travis.yml
.travis/run.sh [deleted file]
tests/ci/install.sh [moved from .travis/install.sh with 51% similarity]
tests/ci/run.sh [new file with mode: 0755]

index b14ec1f7c1dc2654a512be0473f8116a4370505d..958f6cc605ac969e1ceb6aecaf313829270b0f6d 100644 (file)
@@ -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 (executable)
index 70c10f9..0000000
+++ /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
similarity index 51%
rename from .travis/install.sh
rename to tests/ci/install.sh
index d758d5abd591226fa83aa156ef85061162a40382..6d08abace8384e476dad543582a8906cf319ebeb 100755 (executable)
@@ -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 (executable)
index 0000000..1e216bf
--- /dev/null
@@ -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