1lcovrc(5) User Manuals lcovrc(5)
2
3
4
6 lcovrc - lcov configuration file
7
8
10 The lcovrc file contains configuration information for the lcov code
11 coverage tool (see lcov(1)).
12
13 The system-wide configuration file is located at /etc/lcovrc. To
14 change settings for a single user, place a customized copy of this file
15 at location ~/.lcovrc. Where available, command-line options override
16 configuration file settings.
17
18 Lines in a configuration file can either be:
19
20 * empty lines or lines consisting only of white space characters.
21 These lines are ignored.
22
23 * comment lines which start with a hash sign ('#'). These are
24 treated like empty lines and will be ignored.
25
26 * statements in the form 'key = value'. A list of valid state‐
27 ments and their description can be found in section 'OPTIONS'
28 below.
29
30 Example configuration:
31
32 #
33 # Example LCOV configuration file
34 #
35
36 # External style sheet file
37 #genhtml_css_file = gcov.css
38
39 # Coverage rate limits
40 genhtml_hi_limit = 90
41 genhtml_med_limit = 75
42
43 # Width of line coverage field in source code view
44 genhtml_line_field_width = 12
45
46 # Width of branch coverage field in source code view
47 genhtml_branch_field_width = 16
48
49 # Width of overview image
50 genhtml_overview_width = 80
51
52 # Resolution of overview navigation
53 genhtml_nav_resolution = 4
54
55 # Offset for source code navigation
56 genhtml_nav_offset = 10
57
58 # Do not remove unused test descriptions if non-zero
59 genhtml_keep_descriptions = 0
60
61 # Do not remove prefix from directory names if non-zero
62 genhtml_no_prefix = 0
63
64 # Do not create source code view if non-zero
65 genhtml_no_source = 0
66
67 # Specify size of tabs
68 genhtml_num_spaces = 8
69
70 # Highlight lines with converted-only data if non-zero
71 genhtml_highlight = 0
72
73 # Include color legend in HTML output if non-zero
74 genhtml_legend = 0
75
76 # Include HTML file at start of HTML output
77 #genhtml_html_prolog = prolog.html
78
79 # Include HTML file at end of HTML output
80 #genhtml_html_epilog = epilog.html
81
82 # Use custom HTML file extension
83 #genhtml_html_extension = html
84
85 # Compress all generated html files with gzip.
86 #genhtml_html_gzip = 1
87
88 # Include sorted overview pages
89 genhtml_sort = 1
90
91 # Include function coverage data display
92 #genhtml_function_coverage = 1
93
94 # Include branch coverage data display
95 #genhtml_branch_coverage = 1
96
97 # Specify the character set of all generated HTML pages
98 genhtml_charset=UTF-8
99
100 # Allow HTML markup in test case description text if non-zero
101 genhtml_desc_html=0
102
103 # Specify the precision for coverage rates
104 #genhtml_precision=1
105
106 # Location of the gcov tool
107 #geninfo_gcov_tool = gcov
108
109 # Adjust test names if non-zero
110 #geninfo_adjust_testname = 0
111
112 # Calculate a checksum for each line if non-zero
113 geninfo_checksum = 0
114
115 # Enable libtool compatibility mode if non-zero
116 geninfo_compat_libtool = 0
117
118 # Specify whether to capture coverage data for external source
119 # files
120 #geninfo_external = 1
121
122 # Use gcov's --all-blocks option if non-zero
123 #geninfo_gcov_all_blocks = 1
124
125 # Specify compatiblity modes (same as --compat option
126 # of geninfo)
127 #geninfo_compat = libtool=on, hammer=auto, split_crc=auto
128
129 # Adjust path to source files by removing or changing path
130 # components that match the specified pattern (Perl regular
131 # expression format)
132 #geninfo_adjust_src_path = /tmp/build => /usr/src
133
134 # Specify if geninfo should try to automatically determine
135 # the base-directory when collecting coverage data.
136 geninfo_auto_base = 1
137
138 # Directory containing gcov kernel files
139 lcov_gcov_dir = /proc/gcov
140
141 # Location for temporary directories
142 lcov_tmp_dir = /tmp
143
144 # Show full paths during list operation if non-zero
145 lcov_list_full_path = 0
146
147 # Specify the maximum width for list output. This value is
148 # ignored when lcov_list_full_path is non-zero.
149 lcov_list_width = 80
150
151 # Specify the maximum percentage of file names which may be
152 # truncated when choosing a directory prefix in list output.
153 # This value is ignored when lcov_list_full_path is non-zero.
154 lcov_list_truncate_max = 20
155
156 # Specify if function coverage data should be collected and
157 # processed.
158 lcov_function_coverage = 1
159
160 # Specify if branch coverage data should be collected and
161 # processed.
162 lcov_branch_coverage = 0
163
165 genhtml_css_file = filename
166
167 Specify an external style sheet file. Use this option to modify
168 the appearance of the HTML output as generated by genhtml. Dur‐
169 ing output generation, a copy of this file will be placed in the
170 output directory.
171
172 This option corresponds to the --css-file command line option of
173 genhtml.
174
175 By default, a standard CSS file is generated.
176
177 genhtml_hi_limit = hi_limit
178 genhtml_med_limit = med_limit
179
180 Specify coverage rate limits for classifying file entries. Use
181 this option to modify the coverage rates (in percent) for line,
182 function and branch coverage at which a result is classified as
183 high, medium or low coverage. This classification affects the
184 color of the corresponding entries on the overview pages of the
185 HTML output:
186
187 High: hi_limit <= rate <= 100 default color: green
188 Medium: med_limit <= rate < hi_limit default color: orange
189 Low: 0 <= rate < med_limit default color: red
190
191 Defaults are 90 and 75 percent.
192
193 genhtml_line_field_width = number_of_characters
194
195 Specify the width (in characters) of the source code view column
196 containing line coverage information.
197
198 Default is 12.
199
200 genhtml_branch_field_width = number_of_characters
201
202 Specify the width (in characters) of the source code view column
203 containing branch coverage information.
204
205 Default is 16.
206
207 genhtml_overview_width = pixel_size
208
209 Specify the width (in pixel) of the overview image created when
210 generating HTML output using the --frames option of genhtml.
211
212 Default is 80.
213
214 genhtml_nav_resolution = lines
215
216 Specify the resolution of overview navigation when generating
217 HTML output using the --frames option of genhtml. This number
218 specifies the maximum difference in lines between the position a
219 user selected from the overview and the position the source code
220 window is scrolled to.
221
222 Default is 4.
223
224 genhtml_nav_offset = lines
225
226 Specify the overview navigation line offset as applied when gen‐
227 erating HTML output using the --frames option of genhtml.
228
229 Clicking a line in the overview image should show the source
230 code view at a position a bit further up, so that the requested
231 line is not the first line in the window. This number specifies
232 that offset.
233
234 Default is 10.
235
236 genhtml_keep_descriptions = 0|1
237
238 If non-zero, keep unused test descriptions when generating HTML
239 output using genhtml.
240
241 This option corresponds to the --keep-descriptions option of
242 genhtml.
243
244 Default is 0.
245
246 genhtml_no_prefix = 0|1
247
248 If non-zero, do not try to find and remove a common prefix from
249 directory names.
250
251 This option corresponds to the --no-prefix option of genhtml.
252
253 Default is 0.
254
255 genhtml_no_source = 0|1
256
257 If non-zero, do not create a source code view when generating
258 HTML output using genhtml.
259
260 This option corresponds to the --no-source option of genhtml.
261
262 Default is 0.
263
264 genhtml_num_spaces = num
265
266 Specify the number of spaces to use as replacement for tab char‐
267 acters in the HTML source code view as generated by genhtml.
268
269 This option corresponds to the --num-spaces option of genthml.
270
271 Default is 8.
272
273
274 genhtml_highlight = 0|1
275
276 If non-zero, highlight lines with converted-only data in HTML
277 output as generated by genhtml.
278
279 This option corresponds to the --highlight option of genhtml.
280
281 Default is 0.
282
283 genhtml_legend = 0|1
284
285 If non-zero, include a legend explaining the meaning of color
286 coding in the HTML output as generated by genhtml.
287
288 This option corresponds to the --legend option of genhtml.
289
290 Default is 0.
291
292 genhtml_html_prolog = filename
293
294 If set, include the contents of the specified file at the begin‐
295 ning of HTML output.
296
297 This option corresponds to the --html-prolog option of genhtml.
298
299 Default is to use no extra prolog.
300
301 genhtml_html_epilog = filename
302
303 If set, include the contents of the specified file at the end of
304 HTML output.
305
306 This option corresponds to the --html-epilog option of genhtml.
307
308 Default is to use no extra epilog.
309
310 genhtml_html_extension = extension
311
312 If set, use the specified string as filename extension for gen‐
313 erated HTML files.
314
315 This option corresponds to the --html-extension option of gen‐
316 html.
317
318 Default extension is "html".
319
320 genhtml_html_gzip = 0|1
321
322 If set, compress all html files using gzip.
323
324 This option corresponds to the --html-gzip option of genhtml.
325
326 Default extension is 0.
327
328 genhtml_sort = 0|1
329
330 If non-zero, create overview pages sorted by coverage rates when
331 generating HTML output using genhtml.
332
333 This option can be set to 0 by using the --no-sort option of
334 genhtml.
335
336 Default is 1.
337
338 genhtml_function_coverage = 0|1
339
340 If non-zero, include function coverage data when generating HTML
341 output using genhtml.
342
343 This option can be set to 0 by using the --no-function-coverage
344 option of genhtml.
345
346 Default is 1.
347
348 genhtml_branch_coverage = 0|1
349
350 If non-zero, include branch coverage data when generating HTML
351 output using genhtml.
352
353 This option can be set to 0 by using the --no-branch-coverage
354 option of genhtml.
355
356 Default is 1.
357
358 genhtml_charset = charset
359
360 Specify the character set of all generated HTML pages.
361
362 Use this option if the source code contains characters which are
363 not part of the default character set. Note that this option is
364 ignored when a custom HTML prolog is specified (see also gen‐
365 html_html_prolog).
366
367 Default is UTF-8.
368
369 genhtml_desc_html = 0|1
370
371 If non-zero, test case descriptions may contain HTML markup.
372
373 Set this option to one if you want to embed HTML markup (for
374 example to include links) in test case descriptions. When set to
375 zero, HTML markup characters will be escaped to show up as plain
376 text on the test case description page.
377
378 Default is 0.
379
380 genhtml_precision = 1|2|3|4
381
382 Specify how many digits after the decimal-point should be used
383 for displaying coverage rates.
384
385 Default is 1.
386
387 geninfo_gcov_tool = path_to_gcov
388
389 Specify the location of the gcov tool (see gcov(1)) which is
390 used to generate coverage information from data files.
391
392 Default is 'gcov'.
393
394 geninfo_adjust_testname = 0|1
395
396 If non-zero, adjust test names to include operating system
397 information when capturing coverage data.
398
399 Default is 0.
400
401 geninfo_checksum = 0|1
402
403 If non-zero, generate source code checksums when capturing cov‐
404 erage data. Checksums are useful to prevent merging coverage
405 data from incompatible source code versions but checksum genera‐
406 tion increases the size of coverage files and the time used to
407 generate those files.
408
409 This option corresponds to the --checksum and --no-checksum com‐
410 mand line option of geninfo.
411
412 Default is 0.
413
414 geninfo_compat_libtool = 0|1
415
416 If non-zero, enable libtool compatibility mode. When libtool
417 compatibility mode is enabled, lcov will assume that the source
418 code relating to a .da file located in a directory named ".libs"
419 can be found in its parent directory.
420
421 This option corresponds to the --compat-libtool and --no-com‐
422 pat-libtool command line option of geninfo.
423
424 Default is 1.
425
426 geninfo_external = 0|1
427
428 If non-zero, capture coverage data for external source files.
429
430 External source files are files which are not located in one of
431 the directories (including sub-directories) specified by the
432 --directory or --base-directory options of lcov/geninfo.
433
434 Default is 1.
435
436 geninfo_gcov_all_blocks = 0|1
437
438 If non-zero, call the gcov tool with option --all-blocks.
439
440 Using --all-blocks will produce more detailed branch coverage
441 information for each line. Set this option to zero if you do not
442 need detailed branch coverage information to speed up the
443 process of capturing code coverage or to work around a bug in
444 some versions of gcov which will cause it to endlessly loop when
445 analysing some files.
446
447 Default is 1.
448
449 geninfo_compat = mode=value[,mode=value,...]
450
451 Specify that geninfo should enable one or more compatibility
452 modes when capturing coverage data.
453
454 This option corresponds to the --compat command line option of
455 geninfo.
456
457 Default is 'libtool=on, hammer=auto, split_crc=auto'.
458
459 geninfo_adjust_src_path = pattern => replacement
460 geninfo_adjust_src_path = pattern
461
462 Adjust source paths when capturing coverage data.
463
464 Use this option in situations where geninfo cannot find the cor‐
465 rect path to source code files of a project. By providing a pat‐
466 tern in Perl regular expression format (see perlre(1)) and an
467 optional replacement string, you can instruct geninfo to remove
468 or change parts of the incorrect source path.
469
470 Example:
471
472 1. When geninfo reports that it cannot find source file
473
474 /path/to/src/.libs/file.c
475
476 while the file is actually located in
477
478 /path/to/src/file.c
479
480 use the following parameter:
481
482 geninfo_adjust_src_path = /.libs
483
484 This will remove all "/.libs" strings from the path.
485
486 2. When geninfo reports that it cannot find source file
487
488 /tmp/build/file.c
489
490 while the file is actually located in
491
492 /usr/src/file.c
493
494 use the following parameter:
495
496 geninfo_adjust_src_path = /tmp/build => /usr/src
497
498 This will change all "/tmp/build" strings in the path to
499 "/usr/src".
500
501 geninfo_auto_base = 0|1
502
503 If non-zero, apply a heuristic to determine the base directory
504 when collecting coverage data.
505
506 Use this option when using geninfo on projects built with
507 libtool or similar build environments that work with multiple
508 base directories, i.e. environments, where the current working
509 directory when invoking the compiler ist not the same directory
510 in which the source code file is located, and in addition, is
511 different between files of the same project.
512
513 Default is 1.
514
515 lcov_gcov_dir = path_to_kernel_coverage_data
516
517 Specify the path to the directory where kernel coverage data can
518 be found or leave undefined for auto-detection.
519
520 Default is auto-detection.
521
522 lcov_tmp_dir = temp
523
524 Specify the location of a directory used for temporary files.
525
526 Default is '/tmp'.
527
528 lcov_list_full_path = 0|1
529
530 If non-zero, print the full path to source code files during a
531 list operation.
532
533 This option corresponds to the --list-full-path option of lcov.
534
535 Default is 0.
536
537 lcov_list_max_width = width
538
539 Specify the maximum width for list output. This value is ignored
540 when lcov_list_full_path is non-zero.
541
542 Default is 80.
543
544 lcov_list_truncate_max = percentage
545
546 Specify the maximum percentage of file names which may be trun‐
547 cated when choosing a directory prefix in list output. This
548 value is ignored when lcov_list_full_path is non-zero.
549
550 Default is 20.
551
552 lcov_function_coverage = 0|1
553
554 Specify whether lcov should handle function coverage data.
555
556 Setting this option to 0 can reduce memory and CPU time consump‐
557 tion when lcov is collecting and processing coverage data, as
558 well as reduce the size of the resulting data files. Note that
559 setting genhtml_function_coverage will override this option for
560 HTML generation.
561
562 Default is 1.
563
564 lcov_branch_coverage = 0|1
565
566 Specify whether lcov should handle branch coverage data.
567
568 Setting this option to 0 can reduce memory and CPU time consump‐
569 tion when lcov is collecting and processing coverage data, as
570 well as reduce the size of the resulting data files. Note that
571 setting genhtml_branch_coverage will override this option for
572 HTML generation.
573
574 Default is 0.
575
576 lcov_excl_line = expression
577
578 Specify the regular expression of lines to exclude.
579
580 Default is 'LCOV_EXCL_LINE'.
581
582 lcov_excl_br_line = expression
583
584 Specify the regular expression of lines to exclude from branch
585 coverage.
586
587 Default is 'LCOV_EXCL_BR_LINE'.
588
590 /etc/lcovrc
591 The system-wide lcov configuration file.
592
593
594 ~/.lcovrc
595 The individual per-user configuration file.
596
598 lcov(1), genhtml(1), geninfo(1), gcov(1)
599
600
601
6022016-12-19 LCOV 1.13 lcovrc(5)