README: add a section for test coverage

It is a hassle to figure out the exact commands to create a good
report.
This commit is contained in:
Marko Bencun 2019-12-29 21:52:01 +01:00
parent 227a4f2d07
commit acb7f97eb8
No known key found for this signature in database
GPG Key ID: 804538928C37EAE8
1 changed files with 21 additions and 0 deletions

View File

@ -77,6 +77,27 @@ With valgrind, you might need to increase the max stack size:
$ valgrind --max-stackframe=2500000 ./exhaustive_tests $ valgrind --max-stackframe=2500000 ./exhaustive_tests
Test coverage
-----------
This library aims to have full coverage of the reachable lines and branches.
To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary):
$ ./configure --enable-coverage
Run the tests:
$ make check
To create a report, `gcovr` is recommended, as it includes branch coverage reporting:
$ gcovr --exclude 'src/bench*' --print-summary
To create a HTML report with coloured and annotated source code:
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage.html
Reporting a vulnerability Reporting a vulnerability
------------ ------------