From 81b12d9e39e3621416e6c5e2da073351a924de13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= Date: Sat, 23 Jun 2018 18:57:05 +0200 Subject: [PATCH] [tests] generate code coverage report --- tests/travis/build-and-test | 10 ++++++++++ tests/travis/install-build-depends | 2 ++ 2 files changed, 12 insertions(+) diff --git a/tests/travis/build-and-test b/tests/travis/build-and-test index 64957ba67..76d2b08c3 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 --no-gcov +fi diff --git a/tests/travis/install-build-depends b/tests/travis/install-build-depends index f735d8166..62d2f99a7 100755 --- a/tests/travis/install-build-depends +++ b/tests/travis/install-build-depends @@ -9,3 +9,5 @@ full*) sudo apt-get install -qq doxygen libopus-dev libspeex-dev libtheora-dev libvpx-dev ;; esac + +pip install --user cpp-coveralls