diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-03-15 10:19:02 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-03-15 10:19:02 +0100 |
commit | 42f7c98980c20e17377559afcd91c7d25caced58 (patch) | |
tree | a665c382740faafd31289005cbab3870c78ec987 | |
parent | 25bfb338a29ac98fd70e7985e90ee50f3f064369 (diff) | |
download | strongswan-42f7c98980c20e17377559afcd91c7d25caced58.tar.bz2 strongswan-42f7c98980c20e17377559afcd91c7d25caced58.tar.xz |
travis: Create coverage report via codecov.io
-rw-r--r-- | .codecov.yml | 3 | ||||
-rw-r--r-- | .travis.yml | 7 | ||||
-rwxr-xr-x | scripts/test.sh | 10 |
3 files changed, 17 insertions, 3 deletions
diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..aa85a5ab2 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,3 @@ +ignore: + - "*/suites/*" + - "*/tests/*" diff --git a/.travis.yml b/.travis.yml index 5322e69ad..e1329b347 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -47,6 +52,8 @@ matrix: - 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 # TryAcquireSRWLockExclusive in MinGW 3.1.0 diff --git a/scripts/test.sh b/scripts/test.sh index db24222c7..50e1546f4 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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 |