aboutsummaryrefslogtreecommitdiff
path: root/doc/HACKING/WritingTests.md
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2017-10-02 14:51:48 -0500
committerTaylor Yu <catalyst@torproject.org>2017-10-03 07:45:36 -0500
commit6a2a49e6616702c39e56c21091167316a82fcc85 (patch)
treef86ca35a45994142b7880241d9a52f62fb06340f /doc/HACKING/WritingTests.md
parentdddae36f5e0e9e088cd9aa98c6e4a6c904e1efa4 (diff)
downloadtor-6a2a49e6616702c39e56c21091167316a82fcc85.tar.gz
tor-6a2a49e6616702c39e56c21091167316a82fcc85.zip
Improve docs on using gcov
Add more explanation in doc/HACKING about how to read gcov output, including a reference to the gcov documentation in the GCC manual. Also add details about how our postprocessing scripts modify gcov output.
Diffstat (limited to 'doc/HACKING/WritingTests.md')
-rw-r--r--doc/HACKING/WritingTests.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/HACKING/WritingTests.md b/doc/HACKING/WritingTests.md
index 4dae41e922..cc393494ec 100644
--- a/doc/HACKING/WritingTests.md
+++ b/doc/HACKING/WritingTests.md
@@ -91,6 +91,9 @@ coverage percentage.
For a summary of the test coverage for each _function_, run
`./scripts/test/cov-display -f ${TMPDIR}/*`.
+For more details on using gcov, including the helper scripts in
+scripts/test, see HelpfulTools.md.
+
### Comparing test coverage
Sometimes it's useful to compare test coverage for a branch you're writing to
@@ -117,7 +120,8 @@ with LCOV_EXCL_START... LCOV_EXCL_STOP. Note that older versions of
lcov don't understand these lines.
You can post-process .gcov files to make these lines 'unreached' by
-running ./scripts/test/cov-exclude on them.
+running ./scripts/test/cov-exclude on them. It marks excluded
+unreached lines with 'x', and excluded reached lines with '!!!'.
Note: you should never do this unless the line is meant to 100%
unreachable by actual code.