Skip to content

Commit

Permalink
docs: move coverage report instructions to CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasnick committed Dec 4, 2023
1 parent 76880e4 commit 0922a04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -39,3 +39,24 @@ Chat history logs can be found at https://gnusha.org/secp256k1/.
## Contributor workflow & peer review

The Contributor Workflow & Peer Review in libsecp256k1 are similar to Bitcoin Core's workflow and review processes described in Core's [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md).

### Test coverage

This library aims to have full coverage of 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:

$ mkdir -p coverage
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html
22 changes: 0 additions & 22 deletions README.md
Expand Up @@ -117,28 +117,6 @@ Usage examples can be found in the [examples](examples) directory. To compile th

To compile the Schnorr signature and ECDH examples, you also need to configure with `--enable-module-schnorrsig` and `--enable-module-ecdh`.

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:

$ mkdir -p coverage
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html

Benchmark
------------
If configured with `--enable-benchmark` (which is the default), binaries for benchmarking the libsecp256k1 functions will be present in the root directory after the build.
Expand Down

0 comments on commit 0922a04

Please sign in to comment.