instrumentation, so that it becomes possible to examine which
parts of the code are covered by the regression tests or any other
test suite that is run with the code. This is currently supported
- when compiling with GCC and requires the gcov
+ when compiling with GCC, and it requires the gcov
and lcov programs.
- A typical workflow would look like this:
+ A typical workflow looks like this:
./configure --enable-coverage ... OTHER OPTIONS ...
make
Then point your HTML browser
to coverage/index.html.
- The make commands also work in subdirectories.
If you don't have lcov or prefer text output over an
- HTML report, you can also run
+ HTML report, you can run
make coverage
- To reset the execution counts between test runs, run:
+ You can run several different tests before making the coverage report;
+ the execution counts will accumulate. If you want
+ to reset the execution counts between test runs, run:
make coverage-clean
+
+ You can run the make coverage-html or make
+ coverage command in a subdirectory if you want a coverage
+ report for only a portion of the code tree.
+
+
+ Use make distclean to clean up when done.
+