Add Daniel Dunbar's lcov instructions to HACKING
authorBo Borgerson <gigabo@gmail.com>
Wed, 30 Apr 2008 12:49:59 +0000 (08:49 -0400)
committerJim Meyering <meyering@redhat.com>
Wed, 30 Apr 2008 14:09:33 +0000 (16:09 +0200)
* HACKING: New section `Finding things to do', points to TODO file and
gives instructions on generating an html coverage report as provided by
Daniel Dunbar.
* TODO: Add item for improving test coverage.  Point back to HACKING.

Signed-off-by: Bo Borgerson <gigabo@gmail.com>
HACKING
TODO

diff --git a/HACKING b/HACKING
index b40ff00..c33bdd3 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -317,3 +317,30 @@ Miscellaneous useful git commands
   * git rebase -i master: run this from on a branch, and it gives
       you an interface with which you can reorder and modify arbitrary
       change sets on that branch.
+
+-------------------------------------------
+
+Finding things to do
+====================
+If you don't know where to start, check out the TODO file for projects
+that look like they're at your skill-/interest-level.  Another good
+option is always to improve tests.  You never know what you might
+uncover when you improve test coverage, and even if you don't find
+any bugs your contribution is sure to be appreciated.
+
+A good way to quickly assess current test coverage is to use "lcov"
+to generate HTML coverage reports.  Follow these steps:
+
+  # configure with coverage information
+  ./configure CFLAGS="-g -fprofile-arcs -ftest-coverage"
+  make
+  # run whatever tests you want, i.e.:
+  make check
+  # run lcov
+  lcov -t coreutils -q -d lib -b lib -o lib.lcov -c
+  lcov -t coreutils -q -d src -b src -o src.lcov -c
+  # generate HTML from the output
+  genhtml -p `pwd` -t coreutils -q --output-directory lcov-html *.lcov
+
+Then just open the index.html file (in the generated lcov-html directory)
+in your favorite web browser.
diff --git a/TODO b/TODO
index 86320b9..bda8de2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -106,6 +106,9 @@ Remove suspicious uses of alloca (ones that may allocate more than
 Adapt these contribution guidelines for coreutils:
   http://sources.redhat.com/automake/contribute.html
 
+Improve test coverage.
+  See HACKING for instructions on generating an html test coverage report.
+  Find a program that has poor coverage and improve.
 
 Changes expected to go in, someday.
 ======================================