Skip to content

Commit

Permalink
README: add a section for test coverage
Browse files Browse the repository at this point in the history
Summary:
It is a hassle to figure out the exact commands to create a good
report.

This is a backport of libsecp256k1 [[bitcoin-core/secp256k1#704 | PR704]]

Depends on D5383

Test Plan: Read

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5387
  • Loading branch information
benma authored and sickpig committed Mar 24, 2020
1 parent 3979c6e commit 9877389
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/secp256k1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,27 @@ With valgrind, you might need to increase the max stack size:

$ 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
------------

Expand Down

0 comments on commit 9877389

Please sign in to comment.