]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
travis: integrate coverity script in regular run.sh
authorVincent Bernat <vincent@bernat.im>
Fri, 16 May 2014 08:34:16 +0000 (10:34 +0200)
committerVincent Bernat <vincent@bernat.im>
Fri, 16 May 2014 08:34:16 +0000 (10:34 +0200)
.travis.yml
.travis/run.sh

index 827a4d3cd1fed8b1e8436741cfdd17f2f1d9c6a2..7241bbfe3a704d4a7117bed260c8c8f8b9a0b0d7 100644 (file)
@@ -8,10 +8,13 @@ install:
 script:
   - ./.travis/run.sh
 env:
-  - LLDPD_CONFIG_ARGS=""
-  - LLDPD_CONFIG_ARGS="--with-embedded-libevent"
-  - LLDPD_CONFIG_ARGS="--disable-privsep --with-snmp"
-  - LLDPD_CONFIG_ARGS="--with-snmp --with-xml --with-json --disable-lldpmed --disable-dot1 --disable-dot3"
+  global:
+    - secure: "1qAHFxnz0gIxMMl9DAVzoPvVSpOacWT2G6ItcaoaVe1r4OANzpoHBlbyHX2I/1KFe+BohzjS9kXA4NrlPaL81qfvu9E6qZ9yai/+0gHdzZttB2uvdyFXyDVye3CHHDlYMfRRQf6C+eYs5CKeedWq9Q3arO1GyAWiL9RcW1466sg="
+  matrix:
+    - LLDPD_CONFIG_ARGS=""
+    - LLDPD_CONFIG_ARGS="--with-embedded-libevent"
+    - LLDPD_CONFIG_ARGS="--disable-privsep --with-snmp"
+    - LLDPD_CONFIG_ARGS="--with-snmp --with-xml --with-json --disable-lldpmed --disable-dot1 --disable-dot3"
 matrix:
   include:
     - os: osx
@@ -20,3 +23,10 @@ matrix:
     - os: osx
       compiler: clang
       env: LLDPD_CONFIG_ARGS="--with-snmp --with-xml --with-json"
+    - os: linux
+      compiler: gcc
+      env:
+        - LLDPD_CONFIG_ARGS="--with-snmp --with-xml --with-json"
+        - RUN_COVERITY=1
+        - COVERITY_SCAN_BRANCH_PATTERN=coverity_scan
+        - COVERITY_SCAN_NOTIFICATION_EMAIL="bernat@luffy.cx"
index 2492748c7e265e750dc7fb4c9c7c327a27320b22..ef102cf57287dc9a1f727ddd5a9666cb951392c5 100755 (executable)
@@ -5,9 +5,16 @@ set -e
 ./autogen.sh
 ./configure $LLDPD_CONFIG_ARGS
 
-# When running coverity, do not run make
-[ "${COVERITY_SCAN_BRANCH}" != 1 ] || exit 0
-
-LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --with-systemdsystemunitdir=no"
-LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --with-launchddaemonsdir=no"
-make distcheck DISTCHECK_CONFIGURE_FLAGS="$LLDPD_CONFIG_ARGS"
+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" \
+        bash
+else
+    # Regular build
+    LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --with-systemdsystemunitdir=no"
+    LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --with-launchddaemonsdir=no"
+    make distcheck DISTCHECK_CONFIGURE_FLAGS="$LLDPD_CONFIG_ARGS"
+fi