Skip to content

Commit 0922a04

Browse files
committed
docs: move coverage report instructions to CONTRIBUTING
1 parent 76880e4 commit 0922a04

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,24 @@ Chat history logs can be found at https://gnusha.org/secp256k1/.
3939
## Contributor workflow & peer review
4040

4141
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).
42+
43+
### Test coverage
44+
45+
This library aims to have full coverage of reachable lines and branches.
46+
47+
To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary):
48+
49+
$ ./configure --enable-coverage
50+
51+
Run the tests:
52+
53+
$ make check
54+
55+
To create a report, `gcovr` is recommended, as it includes branch coverage reporting:
56+
57+
$ gcovr --exclude 'src/bench*' --print-summary
58+
59+
To create a HTML report with coloured and annotated source code:
60+
61+
$ mkdir -p coverage
62+
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html

README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,6 @@ Usage examples can be found in the [examples](examples) directory. To compile th
117117

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

120-
Test coverage
121-
-----------
122-
123-
This library aims to have full coverage of the reachable lines and branches.
124-
125-
To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary):
126-
127-
$ ./configure --enable-coverage
128-
129-
Run the tests:
130-
131-
$ make check
132-
133-
To create a report, `gcovr` is recommended, as it includes branch coverage reporting:
134-
135-
$ gcovr --exclude 'src/bench*' --print-summary
136-
137-
To create a HTML report with coloured and annotated source code:
138-
139-
$ mkdir -p coverage
140-
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html
141-
142120
Benchmark
143121
------------
144122
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.

0 commit comments

Comments
 (0)