You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Todd Oliver edited this page Nov 19, 2022
·
2 revisions
As of PR #188, TPS can generate coverage metrics for the test suite.
Dependencies
The coverage metrics are generated by gcov and gcovr. gcov is a
standard part of the GCC suite. gcovr is a python package (see
https://gcovr.com/en/stable/ and https://github.com/gcovr/gcovr). It
is included in the TPS test container or can be installed via pip install gcovr for working outside the container.
Procedure
To generate data for coverage analysis, it is necessary to build using
--coverage. To detect the necessary tools and add this flag, the
--enable-coverage configure option is provided. To generate
coverage information, do the following:
The coverage target will run the test suite (via make check) and
then run gcovr to generate coverage statistics. If you are
interested in examining the coverage from only a subset of the tests,
for example just cyl3d.test, use
$ make coverage TESTS="cyl3d.test"
Examine the results, which are available as html in
<tps-build-dir>/coverage/html/gcovr-report.html