Report coverage with gcovr
This generates GCC code coverage (Gcov) reports via Gcovr.
CFLAGS
are modified in this new job according to Gcovr User Guide.
Once Gcovr 4.2 hits buster (or we opt for Gcovr from PyPI), it's invocations can be reduced thanks to Multiple Output Formats support.
Originally, I tried to mirror the usual build
->unit test
->system test
schema, but I was unable to persuade GitLab to place artifacts to the gcovr
job in the sequence needed (above), which artificially reduces reported coverage. Hence the code duplication.
Test coverage parsing needs to be set to ^TOTAL.*\s+(\d+\%)$
to report code coverage in
- merge request
- job description
See HTML code coverage report.
Closes https://gitlab.isc.org/isc-private/bind-qa/-/issues/23.
Edited by Michal Nowak