ref: adde1baafb8d35ab9ed7c0e59bd410cbc4a3c9e3
parent: a5762cf3ba6b3c80932c01bf4f2940996f744885
author: Paul Brossier <piem@piem.org>
date: Sat Nov 17 10:56:57 EST 2018
[Makefile] disable docs when measuring coverage, add option to zero counters
--- a/Makefile
+++ b/Makefile
@@ -234,6 +234,11 @@
uninstall_python \
check_clean_python
+coverage_cycle: coverage_zero_counters coverage_report
+
+coverage_zero_counters:
+ lcov --zerocounters --directory .
+
coverage: export CFLAGS=--coverage
coverage: export LDFLAGS=--coverage
coverage: export PYTHONPATH=$(PWD)/python/lib
@@ -246,6 +251,8 @@
lcov --capture --no-external --directory . --output-file build/coverage_python.info
lcov -a build/coverage_python.info -a build/coverage_lib.info -o build/coverage.info
+# make sure we don't build the doc, which builds a temporary python module
+coverage_report: export WAFOPTS += --disable-docs
coverage_report: coverage
genhtml build/coverage.info --output-directory lcov_html
mkdir -p gcovr_html/