| geninfo(1) | User Manuals | geninfo(1) |
NAME¶
geninfo - Generate tracefiles from .da filesSYNOPSIS¶
geninfo [-h|--help] [-v|--version] [-q|--quiet][-i|--initial]
[-t|--test-name test-name]
[-o|--output-filename filename] [-f|--follow]
[-b|--base-directory directory]
[--checksum] [--no-checksum]
[--compat-libtool] [--no-compat-libtool]
[--gcov-tool tool] [--ignore-errors errors]
[--no-recursion] directory
DESCRIPTION¶
geninfo converts all GCOV coverage data files found in directory into tracefiles, which the genhtml tool can convert to HTML output.Lines containing this marker will be excluded.
LCOV_EXCL_START
Marks the beginning of an excluded section.
The current line is part of this section.
LCOV_EXCL_STOP
Marks the end of an excluded section. The
current line not part of this section.
OPTIONS¶
-b directoryUse directory as base directory for
relative paths.
Use this option to specify the base directory of a build-environment when
geninfo produces error messages like:
In this example, use /home/user/project as base directory.
This option is required when using geninfo on projects built with libtool or
similar build environments that work with a base directory, i.e. environments,
where the current working directory when invoking the compiler is not the same
directory in which the source code file is located.
Note that this option will not work in environments where multiple base
directories are used. In that case repeat the geninfo call for each base
directory while using the --ignore-errors option to prevent geninfo from
exiting when the first source code file could not be found. This way you can
get partial coverage information for each base directory which can then be
combined using the -a option.
ERROR: could not read source file
/home/user/project/subdir1/subdir2/subdir1/subdir2/file.c
Specify whether to generate checksum data when
writing tracefiles.
Use --checksum to enable checksum generation or --no-checksum to disable it.
Checksum generation is disabled by default.
When checksum generation is enabled, a checksum will be generated for each
source code line and stored along with the coverage data. This checksum will
be used to prevent attempts to combine coverage data from different source
code versions.
If you don't work with different source code versions, disable this option to
speed up coverage data processing and to reduce the size of tracefiles.
Specify whether to enable libtool
compatibility mode.
Use --compat-libtool to enable libtool compatibility mode or --no-compat-libtool
to disable it. The libtool compatibility mode is enabled by default.
When libtool compatibility mode is enabled, geninfo will assume that the source
code relating to a .da file located in a directory named ".libs" can
be found in its parent directory.
If you have directories named ".libs" in your build environment but
don't use libtool, disable this option to prevent problems when capturing
coverage data.
Follow links when searching .da files.
Specify the location of the gcov tool.
Print a short help text, then exit.
Specify a list of errors after which to
continue processing.
Use this option to specify a list of one or more classes of errors after which
geninfo should continue processing instead of aborting.
errors can be a comma-separated list of the following keywords:
gcov: the gcov tool returned with a non-zero return code.
source: the source code file for a data set could not be found.
Capture initial zero coverage data.
Run geninfo with this option on the directories containing .bb, .bbg or .gcno
files before running any test case. The result is a "baseline"
coverage data file that contains zero coverage for every instrumented line and
function. Combine this data file (using lcov -a) with coverage data files
captured after a test run to ensure that the percentage of total lines covered
is correct even when not all object code files were loaded during the test.
Note: currently, the --initial option does not generate branch coverage
information.
Use this option if you want to get coverage
data for the specified directory only without processing subdirectories.
Write all data to output-filename.
If you want to have all data written to a single file (for easier handling), use
this option to specify the respective filename. By default, one tracefile will
be created for each processed .da file.
Do not print progress messages.
Suppresses all informational progress output. When this switch is enabled, only
error or warning messages are printed.
Use test case name testname for
resulting data. Valid test case names can consist of letters, decimal digits
and the underscore character ('_').
This proves useful when data from several test cases is merged (i.e. by simply
concatenating the respective tracefiles) in which case a test name can be used
to differentiate between data from each test case.
Print version number, then exit.
FILES¶
/etc/lcovrcThe system-wide configuration file.
The per-user configuration file.
TN:<test name>
SF:<absolute path to the source file>
FN:<line number of function start>,<function name>
FNDA:<execution count>,<function name>
FNF:<number of functions found>
FNH:<number of function hit>
BRDA:<line number>,<block number>,<branch number>,<taken>
BRF:<number of branches found>
BRH:<number of branches hit>
DA:<line number>,<execution count>[,<checksum>]
LH:<number of lines with a non-zero execution count>
LF:<number of instrumented lines>
end_of_record
AUTHOR¶
Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>SEE ALSO¶
lcov(1), genhtml(1), genpng(1), gendesc(1), gcov(1)| LCOV 1.9 | 2010-08-06 |