Skip to content

Commit

Permalink
README: add a section for test coverage
Browse files Browse the repository at this point in the history
It is a hassle to figure out the exact commands to create a good
report.
  • Loading branch information
benma committed Jan 3, 2020
1 parent f45d897 commit 19f4b8a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,25 @@ With valgrind, you might need to increase the max stack size:

$ valgrind --max-stackframe=2500000 ./exhaustive_tests

Test coverage
-----------

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 the coverage of all branches:

$ gcovr --exclude 'src/bench*' --print-summary

To create a HTML report with coloured and annotated source code:

$ gcovr -r . --html --html-details -o coverage.html

Reporting a vulnerability
------------

Expand Down

0 comments on commit 19f4b8a

Please sign in to comment.