Merge #704: README: add a section for test coverage
acb7f97eb82dfbbdb797354e1550b910055b4422 README: add a section for test coverage (Marko Bencun) Pull request description: It is a hassle to figure out the exact commands to create a good report. ACKs for top commit: real-or-random: ACK acb7f97eb82dfbbdb797354e1550b910055b4422 sipa: ACK acb7f97eb82dfbbdb797354e1550b910055b4422 Tree-SHA512: d39f3e0b289229b2ce085406f6d716fdd54038df9ee5273a18a05140d1eddd4149149e881cc7a13f2126347217b9c56a0c12adf558c49879c5f556695242afc6
This commit is contained in:
commit
074ab582dd
21
README.md
21
README.md
@ -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
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user