aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-01-21 16:44:48 -0500
committerNick Mathewson <nickm@torproject.org>2014-01-21 16:44:48 -0500
commit6a6bc9da531f3a4321bc421e76fd153efa69f2c0 (patch)
tree7d71b1aba1e6f8a259784471a63dd3cf5450071c /doc
parent01c7d06b91b120e245558c08a73b609d460520e4 (diff)
downloadtor-6a6bc9da531f3a4321bc421e76fd153efa69f2c0.tar
tor-6a6bc9da531f3a4321bc421e76fd153efa69f2c0.tar.gz
Document more coverage tricks in doc/HACKING
Diffstat (limited to 'doc')
-rw-r--r--doc/HACKING16
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/HACKING b/doc/HACKING
index a0072ec53..39eafec20 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -120,7 +120,7 @@ Running gcov for unit test coverage
-----
./configure --enable-coverage
make
- ./src/test/test
+ make check
mkdir coverage-output
./contrib/coverage coverage-output
-----
@@ -135,6 +135,20 @@ If that doesn't work:
* Try configuring Tor with --disable-gcc-hardening
* You might need to run 'make clean' after you run './configure'.
+If you make changes to Tor and want to get another set of coverage results,
+you can run "make reset-gcov" to clear the intermediary gcov output.
+
+If you have two different "coverage-output" directories, and you want to see
+a meaningful diff between them, you can run:
+
+-----
+ ./contrib/cov-diff coverage-output1 coverage-output2 | less
+-----
+
+In this diff, any lines that were visited at least once will have coverage
+"1". This lets you inspect what you (probably) really want to know: which
+untested lines were changed? Are there any new untested lines?
+
Running integration tests
~~~~~~~~~~~~~~~~~~~~~~~~~