Skip to content

Commit 074ab58

Browse files
committed
Merge dashpay#704: README: add a section for test coverage
acb7f97 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 acb7f97 sipa: ACK acb7f97 Tree-SHA512: d39f3e0b289229b2ce085406f6d716fdd54038df9ee5273a18a05140d1eddd4149149e881cc7a13f2126347217b9c56a0c12adf558c49879c5f556695242afc6
2 parents 227a4f2 + acb7f97 commit 074ab58

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,27 @@ With valgrind, you might need to increase the max stack size:
7777

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

80+
Test coverage
81+
-----------
82+
83+
This library aims to have full coverage of the reachable lines and branches.
84+
85+
To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary):
86+
87+
$ ./configure --enable-coverage
88+
89+
Run the tests:
90+
91+
$ make check
92+
93+
To create a report, `gcovr` is recommended, as it includes branch coverage reporting:
94+
95+
$ gcovr --exclude 'src/bench*' --print-summary
96+
97+
To create a HTML report with coloured and annotated source code:
98+
99+
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage.html
100+
80101
Reporting a vulnerability
81102
------------
82103

0 commit comments

Comments
 (0)