blob: 8566ef30da8b29cc909ab07c58f6c1f69d6e83c8 [file] [log] [blame]
.TH lcovrc 5 "LCOV 1.10" 2012\-10\-10 "User Manuals"
.SH NAME
lcovrc \- lcov configuration file
.SH DESCRIPTION
The
.I lcovrc
file contains configuration information for the
.B lcov
code coverage tool (see
.BR lcov (1)).
.br
The system\-wide configuration file is located at
.IR /etc/lcovrc .
To change settings for a single user, place a customized copy of this file at
location
.IR ~/.lcovrc .
Where available, command\-line options override configuration file settings.
Lines in a configuration file can either be:
.IP " *"
empty lines or lines consisting only of white space characters. These lines are
ignored.
.IP " *"
comment lines which start with a hash sign ('#'). These are treated like empty
lines and will be ignored.
.IP " *"
statements in the form
.RI ' key " = " value '.
A list of valid statements and their description can be found in
section 'OPTIONS' below.
.PP
.B Example configuration:
.IP
#
.br
# Example LCOV configuration file
.br
#
.br
# External style sheet file
.br
#genhtml_css_file = gcov.css
.br
# Coverage rate limits
.br
genhtml_hi_limit = 90
.br
genhtml_med_limit = 75
.br
# Width of line coverage field in source code view
.br
genhtml_line_field_width = 12
.br
# Width of branch coverage field in source code view
.br
genhtml_branch_field_width = 16
.br
# Width of overview image
.br
genhtml_overview_width = 80
.br
# Resolution of overview navigation
.br
genhtml_nav_resolution = 4
.br
# Offset for source code navigation
.br
genhtml_nav_offset = 10
.br
# Do not remove unused test descriptions if non\-zero
.br
genhtml_keep_descriptions = 0
.br
# Do not remove prefix from directory names if non\-zero
.br
genhtml_no_prefix = 0
.br
# Do not create source code view if non\-zero
.br
genhtml_no_source = 0
.br
# Specify size of tabs
.br
genhtml_num_spaces = 8
.br
# Highlight lines with converted\-only data if non\-zero
.br
genhtml_highlight = 0
.br
# Include color legend in HTML output if non\-zero
.br
genhtml_legend = 0
.br
# Include HTML file at start of HTML output
.br
#genhtml_html_prolog = prolog.html
.br
# Include HTML file at end of HTML output
.br
#genhtml_html_epilog = epilog.html
.br
# Use custom HTML file extension
.br
#genhtml_html_extension = html
.br
# Compress all generated html files with gzip.
.br
#genhtml_html_gzip = 1
.br
# Include sorted overview pages
.br
genhtml_sort = 1
.br
# Include function coverage data display
.br
#genhtml_function_coverage = 1
.br
# Include branch coverage data display
.br
#genhtml_branch_coverage = 1
.br
# Specify the character set of all generated HTML pages
.br
genhtml_charset=UTF\-8
.br
# Location of the gcov tool
.br
#geninfo_gcov_tool = gcov
.br
# Adjust test names if non\-zero
.br
#geninfo_adjust_testname = 0
.br
# Calculate a checksum for each line if non\-zero
.br
geninfo_checksum = 0
.br
# Enable libtool compatibility mode if non\-zero
.br
geninfo_compat_libtool = 0
.br
# Specify whether to capture coverage data for external source
.br
# files
.br
#geninfo_external = 1
.br
# Use gcov's --all-blocks option if non-zero
.br
#geninfo_gcov_all_blocks = 1
.br
# Specify compatiblity modes (same as \-\-compat option
.br
# of geninfo)
.br
#geninfo_compat = libtool=on, hammer=auto, split_crc=auto
.br
# Adjust path to source files by removing or changing path
.br
# components that match the specified pattern (Perl regular
.br
# expression format)
.br
#geninfo_adjust_src_path = /tmp/build => /usr/src
# Specify if geninfo should try to automatically determine
.br
# the base-directory when collecting coverage data.
.br
geninfo_auto_base = 1
.br
# Directory containing gcov kernel files
.br
lcov_gcov_dir = /proc/gcov
.br
# Location for temporary directories
.br
lcov_tmp_dir = /tmp
.br
# Show full paths during list operation if non\-zero
.br
lcov_list_full_path = 0
.br
# Specify the maximum width for list output. This value is
.br
# ignored when lcov_list_full_path is non\-zero.
.br
lcov_list_width = 80
.br
# Specify the maximum percentage of file names which may be
.br
# truncated when choosing a directory prefix in list output.
.br
# This value is ignored when lcov_list_full_path is non\-zero.
.br
lcov_list_truncate_max = 20
# Specify if function coverage data should be collected and
.br
# processed.
.br
lcov_function_coverage = 1
.br
# Specify if branch coverage data should be collected and
.br
# processed.
.br
lcov_branch_coverage = 0
.br
.PP
.SH OPTIONS
.BR genhtml_css_file " ="
.I filename
.IP
Specify an external style sheet file. Use this option to modify the appearance of the HTML output as generated by
.BR genhtml .
During output generation, a copy of this file will be placed in the output
directory.
.br
This option corresponds to the \-\-css\-file command line option of
.BR genhtml .
.br
By default, a standard CSS file is generated.
.PP
.BR genhtml_hi_limit " ="
.I hi_limit
.br
.BR genhtml_med_limit " ="
.I med_limit
.br
.IP
Specify coverage rate limits for classifying file entries. Use this option to
modify the coverage rates (in percent) for line, function and branch coverage at
which a result is classified as high, medium or low coverage. This
classification affects the color of the corresponding entries on the overview
pages of the HTML output:
.br
High: hi_limit <= rate <= 100 default color: green
.br
Medium: med_limit <= rate < hi_limit default color: orange
.br
Low: 0 <= rate < med_limit default color: red
.br
Defaults are 90 and 75 percent.
.PP
.BR genhtml_line_field_width " ="
.I number_of_characters
.IP
Specify the width (in characters) of the source code view column containing
line coverage information.
.br
Default is 12.
.PP
.BR genhtml_branch_field_width " ="
.I number_of_characters
.IP
Specify the width (in characters) of the source code view column containing
branch coverage information.
.br
Default is 16.
.PP
.BR genhtml_overview_width " ="
.I pixel_size
.IP
Specify the width (in pixel) of the overview image created when generating HTML
output using the \-\-frames option of
.BR genhtml .
.br
Default is 80.
.PP
.BR genhtml_nav_resolution " ="
.I lines
.IP
Specify the resolution of overview navigation when generating HTML output using
the \-\-frames option of
.BR genhtml .
This number specifies the maximum difference in lines between the position a
user selected from the overview and the position the source code window is
scrolled to.
.br
Default is 4.
.PP
.BR genhtml_nav_offset " ="
.I lines
.IP
Specify the overview navigation line offset as applied when generating HTML
output using the \-\-frames option of
.BR genhtml.
.br
Clicking a line in the overview image should show the source code view at
a position a bit further up, so that the requested line is not the first
line in the window. This number specifies that offset.
.br
Default is 10.
.PP
.BR genhtml_keep_descriptions " ="
.IR 0 | 1
.IP
If non\-zero, keep unused test descriptions when generating HTML output using
.BR genhtml .
.br
This option corresponds to the \-\-keep\-descriptions option of
.BR genhtml .
.br
Default is 0.
.PP
.BR genhtml_no_prefix " ="
.IR 0 | 1
.IP
If non\-zero, do not try to find and remove a common prefix from directory names.
.br
This option corresponds to the \-\-no\-prefix option of
.BR genhtml .
.br
Default is 0.
.PP
.BR genhtml_no_source " ="
.IR 0 | 1
.IP
If non\-zero, do not create a source code view when generating HTML output using
.BR genhtml .
.br
This option corresponds to the \-\-no\-source option of
.BR genhtml .
.br
Default is 0.
.PP
.BR genhtml_num_spaces " ="
.I num
.IP
Specify the number of spaces to use as replacement for tab characters in the
HTML source code view as generated by
.BR genhtml .
.br
This option corresponds to the \-\-num\-spaces option of
.BR genthml .
.br
Default is 8.
.PP
.BR genhtml_highlight " ="
.IR 0 | 1
.IP
If non\-zero, highlight lines with converted\-only data in
HTML output as generated by
.BR genhtml .
.br
This option corresponds to the \-\-highlight option of
.BR genhtml .
.br
Default is 0.
.PP
.BR genhtml_legend " ="
.IR 0 | 1
.IP
If non\-zero, include a legend explaining the meaning of color coding in the HTML
output as generated by
.BR genhtml .
.br
This option corresponds to the \-\-legend option of
.BR genhtml .
.br
Default is 0.
.PP
.BR genhtml_html_prolog " ="
.I filename
.IP
If set, include the contents of the specified file at the beginning of HTML
output.
This option corresponds to the \-\-html\-prolog option of
.BR genhtml .
.br
Default is to use no extra prolog.
.PP
.BR genhtml_html_epilog " ="
.I filename
.IP
If set, include the contents of the specified file at the end of HTML output.
This option corresponds to the \-\-html\-epilog option of
.BR genhtml .
.br
Default is to use no extra epilog.
.PP
.BR genhtml_html_extension " ="
.I extension
.IP
If set, use the specified string as filename extension for generated HTML files.
This option corresponds to the \-\-html\-extension option of
.BR genhtml .
.br
Default extension is "html".
.PP
.BR genhtml_html_gzip " ="
.IR 0 | 1
.IP
If set, compress all html files using gzip.
This option corresponds to the \-\-html\-gzip option of
.BR genhtml .
.br
Default extension is 0.
.PP
.BR genhtml_sort " ="
.IR 0 | 1
.IP
If non\-zero, create overview pages sorted by coverage rates when generating
HTML output using
.BR genhtml .
.br
This option can be set to 0 by using the \-\-no\-sort option of
.BR genhtml .
.br
Default is 1.
.PP
.BR genhtml_function_coverage " ="
.IR 0 | 1
.IP
If non\-zero, include function coverage data when generating HTML output using
.BR genhtml .
.br
This option can be set to 0 by using the \-\-no\-function\-coverage option of
.BR genhtml .
.br
Default is 1.
.PP
.BR genhtml_branch_coverage " ="
.IR 0 | 1
.IP
If non\-zero, include branch coverage data when generating HTML output using
.BR genhtml .
.br
This option can be set to 0 by using the \-\-no\-branch\-coverage option of
.BR genhtml .
.br
Default is 1.
.PP
.BR genhtml_charset " ="
.I charset
.IP
Specify the character set of all generated HTML pages.
.br
Use this option if the source code contains characters which are not
part of the default character set. Note that this option is ignored
when a custom HTML prolog is specified (see also
.BR genhtml_html_prolog ).
.br
Default is UTF-8.
.PP
.BR geninfo_gcov_tool " ="
.I path_to_gcov
.IP
Specify the location of the gcov tool (see
.BR gcov (1))
which is used to generate coverage information from data files.
.br
Default is 'gcov'.
.PP
.BR geninfo_adjust_testname " ="
.IR 0 | 1
.IP
If non\-zero, adjust test names to include operating system information
when capturing coverage data.
.br
Default is 0.
.PP
.BR geninfo_checksum " ="
.IR 0 | 1
.IP
If non\-zero, generate source code checksums when capturing coverage data.
Checksums are useful to prevent merging coverage data from incompatible
source code versions but checksum generation increases the size of coverage
files and the time used to generate those files.
.br
This option corresponds to the \-\-checksum and \-\-no\-checksum command line
option of
.BR geninfo .
.br
Default is 0.
.PP
.BR geninfo_compat_libtool " ="
.IR 0 | 1
.IP
If non\-zero, enable libtool compatibility mode. When libtool compatibility
mode is enabled, lcov will assume that the source code relating to a .da file
located in a directory named ".libs" can be found in its parent directory.
.br
This option corresponds to the \-\-compat\-libtool and \-\-no\-compat\-libtool
command line option of
.BR geninfo .
.br
Default is 1.
.PP
.BR geninfo_external " ="
.IR 0 | 1
.IP
If non\-zero, capture coverage data for external source files.
External source files are files which are not located in one of the directories
(including sub-directories)
specified by the \-\-directory or \-\-base\-directory options of
.BR lcov / geninfo .
Default is 1.
.PP
.BR geninfo_gcov_all_blocks " ="
.IR 0 | 1
.IP
If non\-zero, call the gcov tool with option --all-blocks.
Using --all-blocks will produce more detailed branch coverage information for
each line. Set this option to zero if you do not need detailed branch coverage
information to speed up the process of capturing code coverage or to work
around a bug in some versions of gcov which will cause it to endlessly loop
when analysing some files.
Default is 1.
.PP
.BR geninfo_compat " ="
.IR mode = value [, mode = value ,...]
.IP
Specify that geninfo should enable one or more compatibility modes
when capturing coverage data.
This option corresponds to the \-\-compat command line option of
.BR geninfo .
Default is 'libtool=on, hammer=auto, split_crc=auto'.
.PP
.BR geninfo_adjust_src_path " ="
.IR pattern " => " replacement
.br
.BR geninfo_adjust_src_path " ="
.I pattern
.IP
Adjust source paths when capturing coverage data.
Use this option in situations where geninfo cannot find the correct
path to source code files of a project. By providing a
.I pattern
in Perl regular expression format (see
.BR perlre (1))
and an optional replacement string, you can instruct geninfo to
remove or change parts of the incorrect source path.
.B Example:
.br
1. When geninfo reports that it cannot find source file
.br
/path/to/src/.libs/file.c
.br
while the file is actually located in
.br
/path/to/src/file.c
.br
use the following parameter:
.br
geninfo_adjust_src_path = /.libs
This will remove all "/.libs" strings from the path.
2. When geninfo reports that it cannot find source file
.br
/tmp/build/file.c
.br
while the file is actually located in
.br
/usr/src/file.c
.br
use the following parameter:
.br
geninfo_adjust_src_path = /tmp/build => /usr/src
.br
This will change all "/tmp/build" strings in the path to "/usr/src".
.PP
.BR geninfo_auto_base " ="
.IR 0 | 1
.IP
If non\-zero, apply a heuristic to determine the base directory when
collecting coverage data.
.br
Use this option when using geninfo on projects built with libtool or
similar build environments that work with multiple base directories,
i.e. environments, where the current working directory when invoking the
compiler ist not the same directory in which the source code file is
located, and in addition, is different between files of the same project.
.br
Default is 1.
.PP
.BR lcov_gcov_dir " ="
.I path_to_kernel_coverage_data
.IP
Specify the path to the directory where kernel coverage data can be found
or leave undefined for auto-detection.
.br
Default is auto-detection.
.PP
.BR lcov_tmp_dir " ="
.I temp
.IP
Specify the location of a directory used for temporary files.
.br
Default is '/tmp'.
.PP
.BR lcov_list_full_path " ="
.IR 0 | 1
.IP
If non-zero, print the full path to source code files during a list operation.
.br
This option corresponds to the \-\-list\-full\-path option of
.BR lcov .
.br
Default is 0.
.PP
.BR lcov_list_max_width " ="
.IR width
.IP
Specify the maximum width for list output. This value is ignored when
lcov_list_full_path is non\-zero.
.br
Default is 80.
.PP
.BR lcov_list_truncate_max
.B " ="
.IR percentage
.IP
Specify the maximum percentage of file names which may be truncated when
choosing a directory prefix in list output. This value is ignored when
lcov_list_full_path is non\-zero.
.br
Default is 20.
.PP
.BR lcov_function_coverage " ="
.IR 0 | 1
.IP
Specify whether lcov should handle function coverage data.
.br
Setting this option to 0 can reduce memory and CPU time consumption
when lcov is collecting and processing coverage data, as well as
reduce the size of the resulting data files. Note that setting
.B genhtml_function_coverage
will override this option for HTML generation.
.br
Default is 1.
.PP
.BR lcov_branch_coverage " ="
.IR 0 | 1
.IP
Specify whether lcov should handle branch coverage data.
.br
Setting this option to 0 can reduce memory and CPU time consumption
when lcov is collecting and processing coverage data, as well as
reduce the size of the resulting data files. Note that setting
.B genhtml_branch_coverage
will override this option for HTML generation.
.br
Default is 0.
.PP
.SH FILES
.TP
.I /etc/lcovrc
The system\-wide
.B lcov
configuration file.
.TP
.I ~/.lcovrc
The individual per\-user configuration file.
.PP
.SH SEE ALSO
.BR lcov (1),
.BR genhtml (1),
.BR geninfo (1),
.BR gcov (1)