From cd810548c53a8a8ebc74b9f31024ad20baf508a9 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sat, 23 Jun 2018 18:57:05 +0200 Subject: [tests] generate code coverage report --- tests/travis/build-and-test | 10 ++++++++++ tests/travis/install-build-depends | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3