aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2018-06-23 18:57:05 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2018-06-24 10:26:05 +0200
commitcd810548c53a8a8ebc74b9f31024ad20baf508a9 (patch)
tree0d61c3336bd4725c501e5cb3b36e3135111aecdc /tests
parentbe25696ed224570e8737d52b6d20fb586ea56ff6 (diff)
downloadqxmpp-cd810548c53a8a8ebc74b9f31024ad20baf508a9.tar.gz
[tests] generate code coverage report
Diffstat (limited to 'tests')
-rwxr-xr-xtests/travis/build-and-test10
-rwxr-xr-xtests/travis/install-build-depends4
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