]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Document more coverage tricks in doc/HACKING
authorNick Mathewson <nickm@torproject.org>
Tue, 21 Jan 2014 21:44:48 +0000 (16:44 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 21 Jan 2014 21:44:48 +0000 (16:44 -0500)
doc/HACKING

index a0072ec53142c83ad2199382db6004d48752375b..39eafec20414d7f38d6c79707f2b57ddf423e5ce 100644 (file)
@@ -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
 ~~~~~~~~~~~~~~~~~~~~~~~~~