File: gcovr.1

package info (click to toggle)
gcovr 4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,820 kB
  • sloc: python: 2,398; xml: 933; makefile: 725; cpp: 310; sh: 145; ansic: 29
file content (182 lines) | stat: -rw-r--r-- 6,258 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.6.
.TH GCOVR "1" "September 2018" "gcovr 4.1" "User Commands"
.SH NAME
gcovr \- generate simple coverage reports
.SH DESCRIPTION
usage: gcovr [options] [search_paths...]
.PP
A utility to run gcov and summarize the coverage in simple reports.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this help message, then exit.
.TP
\fB\-\-version\fR
Print the version number, then exit.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Print progress messages. Please include this output in
bug reports.
.TP
\fB\-r\fR ROOT, \fB\-\-root\fR ROOT
The root directory of your source files. Defaults to
\&'.', the current directory. File names are reported
relative to this root. The \fB\-\-root\fR is the default
\fB\-\-filter\fR.
.TP
search_paths
Search these directories for coverage files. Defaults
to \fB\-\-root\fR and \fB\-\-object\-directory\fR.
.TP
\fB\-\-fail\-under\-line\fR MIN
Exit with a status of 2 if the total line coverage is
less than MIN. Can be ORed with exit status of '\-\-
fail\-under\-branch' option.
.TP
\fB\-\-fail\-under\-branch\fR MIN
Exit with a status of 4 if the total branch coverage
is less than MIN. Can be ORed with exit status of '\-\-
fail\-under\-line' option.
.TP
\fB\-\-source\-encoding\fR SOURCE_ENCODING
Select the source file encoding. Defaults to the
system default encoding (ANSI_X3.4\-1968).
.TP
\fB\-\-html\-medium\-threshold\fR MEDIUM
If the coverage is below MEDIUM, the value is marked
as low coverage in the HTML report. MEDIUM has to be
lower than or equal to value of \fB\-\-html\-high\-threshold\fR.
If MEDIUM is equal to value of \fB\-\-html\-high\-threshold\fR
the report has only high and low coverage. Default is
75.0.
.TP
\fB\-\-html\-high\-threshold\fR HIGH
If the coverage is below HIGH, the value is marked as
medium coverage in the HTML report. HIGH has to be
greater than or equal to value of \fB\-\-html\-mediumthreshold\fR. If HIGH is equal to value of \fB\-\-html\-mediumthreshold\fR the report has only high and low coverage.
Default is 90.0.
.SS "Output Options:"
.IP
Gcovr prints a text report by default, but can switch to XML or HTML.
.TP
\fB\-o\fR OUTPUT, \fB\-\-output\fR OUTPUT
Print output to this filename. Defaults to stdout.
Required for \fB\-\-html\-details\fR.
.TP
\fB\-b\fR, \fB\-\-branches\fR
Report the branch coverage instead of the line
coverage. For text report only.
.TP
\fB\-u\fR, \fB\-\-sort\-uncovered\fR
Sort entries by increasing number of uncovered lines.
For text and HTML report.
.TP
\fB\-p\fR, \fB\-\-sort\-percentage\fR
Sort entries by increasing percentage of uncovered
lines. For text and HTML report.
.TP
\fB\-x\fR, \fB\-\-xml\fR
Generate a Cobertura XML report.
.TP
\fB\-\-xml\-pretty\fR
Pretty\-print the XML report. Implies \fB\-\-xml\fR. Default:
False.
.TP
\fB\-\-html\fR
Generate a HTML report.
.TP
\fB\-\-html\-details\fR
Add annotated source code reports to the HTML report.
Requires \fB\-\-output\fR as a basename for the reports.
Implies \fB\-\-html\fR.
.TP
\fB\-\-html\-title\fR TITLE
Use TITLE as title for the HTML report. Default is
Head.
.TP
\fB\-\-html\-absolute\-paths\fR
Use absolute paths to link the \fB\-\-html\-details\fR reports.
Defaults to relative links.
.TP
\fB\-\-html\-encoding\fR HTML_ENCODING
Override the declared HTML report encoding. Defaults
to UTF\-8. See also \fB\-\-source\-encoding\fR.
.TP
\fB\-s\fR, \fB\-\-print\-summary\fR
Print a small report to stdout with line & branch
percentage coverage. This is in addition to other
reports. Default: False.
.SS "Filter Options:"
.IP
Filters decide which files are included in the report. Any filter must
match, and no exclude filter must match. A filter is a regular expression
that matches a path. Filter paths use forward slashes, even on Windows.
.TP
\fB\-f\fR FILTER, \fB\-\-filter\fR FILTER
Keep only source files that match this filter. Can be
specified multiple times. If no filters are provided,
defaults to \fB\-\-root\fR.
.TP
\fB\-e\fR EXCLUDE, \fB\-\-exclude\fR EXCLUDE
Exclude source files that match this filter. Can be
specified multiple times.
.TP
\fB\-\-gcov\-filter\fR GCOV_FILTER
Keep only gcov data files that match this filter. Can
be specified multiple times.
.TP
\fB\-\-gcov\-exclude\fR GCOV_EXCLUDE
Exclude gcov data files that match this filter. Can be
specified multiple times.
.TP
\fB\-\-exclude\-directories\fR EXCLUDE_DIRS
Exclude directories that match this regex while
searching raw coverage files. Can be specified
multiple times.
.SS "GCOV Options:"
.IP
The 'gcov' tool turns raw coverage files (.gcda and .gcno) into .gcov
files that are then processed by gcovr. The gcno files are generated by
the compiler. The gcda files are generated when the instrumented program
is executed.
.TP
\fB\-\-gcov\-executable\fR GCOV_CMD
Use a particular gcov executable. Must match the
compiler you are using, e.g. 'llvm\-cov gcov' for
Clang. Can include additional arguments. Defaults to
the GCOV environment variable, or 'gcov': 'gcov'.
.TP
\fB\-\-exclude\-unreachable\-branches\fR
Exclude branch coverage with LCOV/GCOV exclude
markers. Additionally, exclude branch coverage from
lines without useful source code (often, compilergenerated "dead" code). Default: False.
.TP
\fB\-g\fR, \fB\-\-use\-gcov\-files\fR
Use existing gcov files for analysis. Default: False.
.TP
\fB\-\-gcov\-ignore\-parse\-errors\fR
Skip lines with parse errors in GCOV files instead of
exiting with an error. A report will be shown on
stderr. Default: False.
.TP
\fB\-\-object\-directory\fR OBJDIR
Override normal working directory detection. Gcovr
needs to identify the path between gcda files and the
directory where the compiler was originally run.
Normally, gcovr can guess correctly. This option
specifies either the path from gcc to the gcda file
(i.e. gcc's '\-o' option), or the path from the gcda
file to gcc's working directory.
.TP
\fB\-k\fR, \fB\-\-keep\fR
Keep gcov files after processing. This applies both to
files that were generated by gcovr, or were supplied
via the \fB\-\-use\-gcov\-files\fR option. Default: False.
.TP
\fB\-d\fR, \fB\-\-delete\fR
Delete gcda files after processing. Default: False.
.TP
\fB\-j\fR [GCOV_PARALLEL]
Set the number of threads to use in parallel.
.PP
See <http://gcovr.com/> for the full manual.