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
This commit is contained in:
Benedikt Heine 2018-03-15 04:40:19 +01:00
parent 787cebbc80
commit b4c319350a
2 changed files with 11 additions and 0 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ core
vgcore.*
/docs/dunst.1
/docs/internal/coverage
/docs/internal/html
/dunst
/dunstify

View File

@ -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