diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2018-06-23 18:57:05 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2018-06-24 10:26:05 +0200 |
| commit | cd810548c53a8a8ebc74b9f31024ad20baf508a9 (patch) | |
| tree | 0d61c3336bd4725c501e5cb3b36e3135111aecdc /tests | |
| parent | be25696ed224570e8737d52b6d20fb586ea56ff6 (diff) | |
| download | qxmpp-cd810548c53a8a8ebc74b9f31024ad20baf508a9.tar.gz | |
[tests] generate code coverage report
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/travis/build-and-test | 10 | ||||
| -rwxr-xr-x | tests/travis/install-build-depends | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/travis/build-and-test b/tests/travis/build-and-test index 64957ba6..f07ea2ba 100755 --- a/tests/travis/build-and-test +++ b/tests/travis/build-and-test @@ -15,9 +15,19 @@ case "$CONFIG" in ;; esac +# build with code coverage +if [ "$CONFIG" = "full-debug" ]; then + export CXXFLAGS="-fprofile-arcs -ftest-coverage" +fi + # compile cmake $CMAKE_ARGS make # run tests make test + +# upload coverage report +if [ "$CONFIG" = "full-debug" ]; then + coveralls --exclude-pattern '.*autogen.*' --include src +fi diff --git a/tests/travis/install-build-depends b/tests/travis/install-build-depends index f735d816..9c68d763 100755 --- a/tests/travis/install-build-depends +++ b/tests/travis/install-build-depends @@ -9,3 +9,7 @@ full*) sudo apt-get install -qq doxygen libopus-dev libspeex-dev libtheora-dev libvpx-dev ;; esac + +if [ "$CONFIG" = "full-debug" ]; then + pip install --user cpp-coveralls +fi |
