1 -------------------------------------------------
2 - README file for the LTP GCOV extension (LCOV) -
3 - Last changes: 2008-11-17 -
4 -------------------------------------------------
8 LCOV is an extension of GCOV, a GNU tool which provides information about
9 what parts of a program are actually executed (i.e. "covered") while running
10 a particular test case. The extension consists of a set of PERL scripts
11 which build on the textual GCOV output to implement the following enhanced
14 * HTML based output: coverage rates are additionally indicated using bar
15 graphs and specific colors.
17 * Support for large projects: overview pages allow quick browsing of
18 coverage data by providing three levels of detail: directory view,
19 file view and source code view.
21 LCOV was initially designed to support Linux kernel coverage measurements,
22 but works as well for coverage measurements on standard user space
26 Further README contents
27 -----------------------
30 3. An example of how to access kernel coverage data
31 4. An example of how to access coverage data for a user space program
32 5. Questions and Comments
38 README - This README file
39 CHANGES - List of changes between releases
40 bin/lcov - Tool for capturing LCOV coverage data
41 bin/genhtml - Tool for creating HTML output from LCOV data
42 bin/gendesc - Tool for creating description files as used by genhtml
43 bin/geninfo - Internal tool (creates LCOV data files)
44 bin/genpng - Internal tool (creates png overviews of source files)
45 bin/install.sh - Internal tool (takes care of un-/installing)
46 descriptions.tests - Test descriptions for the LTP suite, use with gendesc
47 man - Directory containing man pages for included tools
48 example - Directory containing an example to demonstrate LCOV
49 lcovrc - LCOV configuration file
50 Makefile - Makefile providing 'install' and 'uninstall' targets
55 The LCOV package is available as either RPM or tarball from:
57 http://ltp.sourceforge.net/coverage/lcov.php
59 To install the tarball, unpack it to a directory and run:
63 Use anonymous CVS for the most recent (but possibly unstable) version:
65 cvs -d:pserver:anonymous@ltp.cvs.sourceforge.net:/cvsroot/ltp login
67 (simply press the ENTER key when asked for a password)
69 cvs -z3 -d:pserver:anonymous@ltp.cvs.sourceforge.net:/cvsroot/ltp export -D now utils
71 Change to the utils/analysis/lcov directory and type:
76 3. An example of how to access kernel coverage data
77 ---------------------------------------------------
78 Requirements: get and install the gcov-kernel package from
80 http://sourceforge.net/projects/ltp
82 Copy the resulting gcov kernel module file to either the system wide modules
83 directory or the same directory as the PERL scripts. As root, do the following:
89 b) Capturing the current coverage state to a file
91 lcov --capture --output-file kernel.info
93 c) Getting HTML output
97 Point the web browser of your choice to the resulting index.html file.
100 4. An example of how to access coverage data for a user space program
101 ---------------------------------------------------------------------
102 Requirements: compile the program in question using GCC with the options
103 -fprofile-arcs and -ftest-coverage. Assuming the compile directory is called
104 "appdir", do the following:
106 a) Resetting counters
108 lcov --directory appdir --zerocounters
110 b) Capturing the current coverage state to a file (works only after the
111 application has been started and stopped at least once)
113 lcov --directory appdir --capture --output-file app.info
115 c) Getting HTML output
119 Point the web browser of your choice to the resulting index.html file.
122 5. Questions and comments
123 -------------------------
124 See the included man pages for more information on how to use the LCOV tools.
126 Please email further questions or comments regarding this tool to the
127 LTP Mailing list at ltp-coverage@lists.sourceforge.net