]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
travis: Create coverage report via codecov.io
authorTobias Brunner <tobias@strongswan.org>
Wed, 15 Mar 2017 09:19:02 +0000 (10:19 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 15 Mar 2017 09:19:02 +0000 (10:19 +0100)
.codecov.yml [new file with mode: 0644]
.travis.yml
scripts/test.sh

diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644 (file)
index 0000000..aa85a5a
--- /dev/null
@@ -0,0 +1,3 @@
+ignore:
+  - "*/suites/*"
+  - "*/tests/*"
index 5322e69adcbb67f0e651be64f70e264122b43a3f..e1329b347d158a6b47ac497c70558c30c053cdfb 100644 (file)
@@ -17,6 +17,11 @@ before_script:
 script:
   - ./scripts/test.sh
 
+after_success:
+  if [ "$TEST" == "coverage" ]; then
+    bash <(curl -s https://codecov.io/bash);
+  fi
+
 after_failure:
   - cat config.log
 
@@ -46,6 +51,8 @@ matrix:
       env: TEST=dist
     - compiler: gcc
       env: TEST=apidoc
+    - compiler: gcc
+      env: TEST=coverage
     - compiler: gcc
       env: TEST=win64 MONOLITHIC=yes
     # this does not work on 14.04 due to a missing @4 decoration for
index db24222c7220570362653c4d5d6d9ffb05c20ac0..50e1546f415f6491ce546806ef2e2b0c8140c9a5 100755 (executable)
@@ -29,7 +29,7 @@ gcrypt)
 printf-builtin)
        CONFIG="--with-printf-hooks=builtin"
        ;;
-all)
+all|coverage)
        CONFIG="--enable-all --disable-android-dns --disable-android-log
                        --disable-dumm --disable-kernel-pfroute --disable-keychain
                        --disable-lock-profiler --disable-padlock
@@ -41,8 +41,12 @@ all)
        CONFIG="$CONFIG --disable-aikpub2 --disable-tss-tss2"
        # not enabled on the build server
        CONFIG="$CONFIG --disable-af-alg"
-       # TODO: enable? perhaps via coveralls.io (cpp-coveralls)?
-       CONFIG="$CONFIG --disable-coverage"
+       if test "$TEST" != "coverage"; then
+               CONFIG="$CONFIG --disable-coverage"
+       else
+               # not actually required but configure checks for it
+               DEPS="$DEPS lcov"
+       fi
        DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev
                  libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev
                  libnm-glib-dev libnm-glib-vpn-dev libpcsclite-dev libpam0g-dev