From b4c319350a81e3990f595e0bd0cf3abfd7d6d485 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Thu, 15 Mar 2018 04:40:19 +0100 Subject: [PATCH] Support gcovr to generate coverage reports The coveralls service is a great webservice, but like the testsuite it's better to have an alternative, which makes it possible to process it locally. This is faster and doesn't even require a full push iteration. gcovr is easy to get: pip install gcovr make test-coverage-report --- .gitignore | 1 + Makefile | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index c04fb02..5fe5061 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ core vgcore.* /docs/dunst.1 +/docs/internal/coverage /docs/internal/html /dunst /dunstify diff --git a/Makefile b/Makefile index 91b8dc1..69deeca 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,15 @@ test-valgrind: test/test test-coverage: CFLAGS += -fprofile-arcs -ftest-coverage -O0 test-coverage: test +test-coverage-report: test-coverage + mkdir -p docs/internal/coverage + gcovr \ + -r . \ + --exclude=test \ + --html \ + --html-details \ + -o docs/internal/coverage/index.html + test/test: ${OBJ} ${TEST_OBJ} ${CC} -o ${@} ${TEST_OBJ} ${OBJ} ${CFLAGS} ${LDFLAGS} @@ -122,6 +131,7 @@ clean-dunstify: clean-doc: rm -f docs/dunst.1 rm -fr docs/internal/html + rm -fr docs/internal/coverage clean-tests: rm -f test/test test/*.o