ci: Add generation of HTML coverage reports using lcov
Change-Id: I877b2c9cd5250f08fd94b2168ff61522aa4df62d
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index dbc8025..5080266 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -12,4 +12,21 @@
--filter="$PWD/src" \
--root=. \
--xml
+
+ # Generate also a detailed HTML output, but using lcov (better results)
+ lcov --quiet \
+ --capture --no-external \
+ --directory . \
+ --rc lcov_branch_coverage=1 \
+ --output-file build/coverage-with-tests.info
+
+ lcov --quiet \
+ --remove build/coverage-with-tests.info "$PWD/tests/*" \
+ --rc lcov_branch_coverage=1 \
+ --output-file build/coverage.info
+
+ genhtml --legend \
+ --rc genhtml_branch_coverage=1 \
+ build/coverage.info \
+ --output-directory build/coverage
fi