From: Bo Borgerson Date: Wed, 30 Apr 2008 12:49:59 +0000 (-0400) Subject: Add Daniel Dunbar's lcov instructions to HACKING X-Git-Tag: v6.12~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbc49eb5368f9f19b66562210a4eb60ff5cfe153;p=thirdparty%2Fcoreutils.git Add Daniel Dunbar's lcov instructions to HACKING * 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 --- diff --git a/HACKING b/HACKING index b40ff00582..c33bdd3767 100644 --- 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 86320b9dee..bda8de271c 100644 --- 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. ======================================