summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKevin Murray <spam@kdmurray.id.au>2014-07-09 18:55:44 +1000
committerNick Mathewson <nickm@torproject.org>2014-07-16 05:54:34 -0400
commiteed942aed9175971b510f0f720274171f1895d01 (patch)
tree04c3be6d5f1e81baf921b025f48b54e47e0bdc31 /doc
parent8fa845548bc2883c6b1335b4815fa945964f517f (diff)
downloadtor-eed942aed9175971b510f0f720274171f1895d01.tar.gz
tor-eed942aed9175971b510f0f720274171f1895d01.zip
Add stanza on lcov coverage target
Adds a note about using `make coverage-html` to generate coverage reports. Signed-off-by: Kevin Murray <spam@kdmurray.id.au>
Diffstat (limited to 'doc')
-rw-r--r--doc/HACKING20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/HACKING b/doc/HACKING
index 2562f7e2e9..6b21426497 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -114,6 +114,26 @@ valgrind --leak-check=yes --error-limit=no --show-reachable=yes src/or/tor
pass --undef-value-errors=no to valgrind, or rebuild your openssl
with -DPURIFY.)
+Running lcov for unit test coverage
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Lcov is a utility that generates pretty HTML reports of test code coverage.
+To generate such a report:
+
+-----
+ ./configure --enable-coverage
+ make
+ make coverage-html
+ $BROWSER ./coverage_html/index.html
+-----
+
+This will run the tor unit test suite `./src/test/test` and generate the HTML
+coverage code report under the directory ./coverage_html/. To change the
+output directory, use `make coverage-html HTML_COVER_DIR=./funky_new_cov_dir`.
+
+Coverage diffs using lcov are not currently implemented, but are being
+investigated (as of July 2014).
+
Running gcov for unit test coverage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~