1
2
3
4
5genhtml(1) User Manuals genhtml(1)
6
7
8
10 genhtml - Generate HTML view from LCOV coverage data files
11
13 genhtml [-h|--help] [--version]
14 [-q|--quiet] [-v|--verbose] [--debug]
15 [-s|--show-details]
16 [-f|--frames]
17 [-b|--baseline-file] baseline-file
18 [-o|--output-directory output-directory]
19 [--header-title banner]
20 [--footer string]
21 [-t|--title title]
22 [-d|--description-file description-file]
23 [-k|--keep-descriptions] [-c|--css-file css-file]
24 [-p|--prefix prefix] [--no-prefix]
25 [--source-directory dirname]
26 [--no-source] [--num-spaces num] [--highlight]
27 [--legend] [--html-prolog prolog-file]
28 [--html-epilog epilog-file] [--html-extension extension]
29 [--html-gzip] [--sort] [--no-sort]
30 [--function-coverage] [--no-function-coverage]
31 [--branch-coverage] [--no-branch-coverage]
32 [--demangle-cpp [param]]
33 [--ignore-errors errors]
34 [--keep-going] [--config-file config-file] [--rc keyword=value]
35 [--precision num] [--missed]
36 [--suppress-aliases]
37 [--forget-test-names]
38 [--dark-mode]
39 [--baseline-file baseline-file]
40 [--baseline-title title]
41 [--baseline-date date]
42 [--current-date date]
43 [--diff-file diff-file]
44 [--annotate-script script]
45 [--criteria-script script]
46 [--version-script script]
47 [--checksum]
48 [--new-files-as-baseline]
49 [--elide-path-mismatch]
50 [--synthesize-missing]
51 [--date-bins day[,day,...]]
52 [--show-owners [all]]
53 [--show-noncode]
54 [--show-zero-columns]
55 [--show-navigation]
56 [--show-proportions]
57 [--simplified-colors]
58 [--hierarchical] [--flat]
59 [--filter filters]
60 [--include glob_pattern]
61 [--exclude glob_pattern]
62 [--erase-functions regexp_pattern]
63 [--substitute regexp_pattern]
64 [--omit-lines regexp_pattern]
65 [--parallel|-j [integer]]
66 [--memory integer_num_Mb]
67 [--tempdir dirname]
68 [--preserve]
69 [--save]
70 tracefile(s)
71
73 genhtml creates an HTML view of coverage data tracefiles generated by
74 the geninfo and lcov tools. Features include:
75
76
77 • Differential coverage comparison against baseline coverage data
78
79 • Annotation of reports with date and owner information ("binning")
80
81 The basic concepts of differential coverage and date/owner binning are
82 described in the paper found at https://arxiv.org/abs/2008.07947
83
84
85 Differential coverage
86 Differential coverage compares two versions of source code - the base‐
87 line and the current versions - and the coverage results for each to
88 segment the code into categories.
89
90 To create a differential coverage report, genhtml requires
91
92
93 1. a baseline-file specified via --baseline-file, and
94
95 2. a patch file in unified format specified using --diff-file.
96
97 Note that while tracefile may be a list of filenames, baseline-file
98 must be a single consolidated file.
99
100 The difference in coverage between tracefile and baseline-file is clas‐
101 sified line-by-line into categories based on changes in 2 aspects:
102
103
104 1. Test coverage results: a line of code can be tested (1), untested
105 (0), or unused (#). An unused line is a source code line that has no
106 associated coverage data, for example due to a disabled #ifdef
107 statement.
108
109 2. Source code changes: a line can be unchanged, added (+ =>), or re‐
110 moved (=> -). Note that the diff-file format used by genhtml re‐
111 ports changes in lines as removal of old line and addition of new
112 line.
113
114 Below are the resulting 12 categories, sorted by priority (assuming
115 that untested code is more interesting than tested code, and new code
116 is more interesting than old code):
117
118 UNC
119 Uncovered New Code (+ => 0): newly added code is not tested.
120
121 LBC
122 Lost Baseline Coverage (1 => 0): unchanged code is no longer
123 tested.
124
125 UIC
126 Uncovered Included Code (# => 0): previously unused code is
127 untested.
128
129 UBC
130 Uncovered Baseline Code (0 => 0): unchanged code was untested
131 before, is untested now.
132
133 GBC
134 Gained Baseline Coverage (0 => 1): unchanged code is tested now.
135
136 GIC
137 Gained Included Coverage (# => 1): previously unused code is
138 tested now.
139
140 GNC
141 Gained New Coverage (+ => 1): newly added code is tested.
142
143 CBC
144 Covered Baseline Code (1 => 1): unchanged code was tested before
145 and is still tested.
146
147 EUB
148 Excluded Uncovered Baseline (0 => #): previously untested code
149 is unused now.
150
151 ECB
152 Excluded Covered Baseline (1 => #): previously tested code is
153 unused now.
154
155 DUB
156 Deleted Uncovered Baseline (0 => -): previously untested code
157 has been deleted.
158
159 Note: Because these lines are not represented in the current
160 source version, they are only represented in the classification
161 summary table.
162
163 DCB
164 Deleted Covered Baseline (1 => -): previously tested code has
165 been deleted.
166
167 Note: Because these lines are not represented in the current
168 source version, they are only represented in the classification
169 summary table.
170
171 The differential coverage report colorizes categorized regions in the
172 source code view using unique colors for each. You can use the --sim‐
173 plified-colors option to instead use one color for 'covered' code and
174 another for 'uncovered'.
175
176
177 Date and owner binning
178 Date binning annotates coverage reports with age-of-last-change infor‐
179 mation to distinguish recently added or modified code which has not
180 been tested from older, presumed stable code which is also not tested.
181 Owner binning adds annotation identifying the author of changes.
182
183 Both age and ownership reporting can be used to enhance team efforts to
184 maintain good coverage discipline by spotlighting coverage shortfalls
185 in recently modified code, even in the absence of baseline coverage
186 data.
187
188 To enable date and owner binning, the --annotate-script option must be
189 used to specify a script that provides source code line age and owner‐
190 ship information.
191
192 For each source line, age is the interval since the most recent modifi‐
193 cation date and the owner is the user identity responsible for the most
194 recent change to that line.
195
196 Line coverage overall totals and counts for each of the 12 classifica‐
197 tion categories are collected for each of the specified age ranges (see
198 the --date-bins option, below).
199
200
201 Script conventions
202 Some genhtml options expect the name of an external script or tool as
203 argument. These scripts are then run as part of the associated func‐
204 tion. This includes the following options:
205
206 --annotate-script
207 --criteria-script
208 --version-script
209
210 While each script performs a separate function there are some common
211 aspects in the way these options are handled:
212
213
214 1. If an option is specified only once, the argument specifies the full
215 command line that genhtml passes to a shell interpreter to run the
216 script. This includes the script path followed by optional addi‐
217 tional parameters separated by spaces. Care must be taken to provide
218 proper quoting if script path or any parameter contains spaces or
219 shell special characters.
220
221 2. If an option is specified multiple times, the first invocation spec‐
222 ifies the script path and any further invocation specifies one addi‐
223 tional parameter. In this case, genhtml takes care of quoting of
224 spaces contained in script location and additional parameters.
225
226 3. genhtml passes any additional parameters specified via option argu‐
227 ments between the script path and the parameters required by the
228 script's function.
229
230 Example:
231
232 genhtml --annotate-script /bin/script.sh
233 --annotate-script "full"
234
235 results in genhtml executing the following command line:
236
237 /bin/script.sh "full" source_file_name
238
239 Note that multiple instances of each script may execute simultaneously
240 if the --parallel option was specified. Therefore each script must ei‐
241 ther be reentrant or should arrange for its own synchronization, if
242 necessary.
243
244
245 Additional considerations
246 If the --criteria-script option is used, genhtml will use the refer‐
247 enced script to determine whether your coverage criteria have been met
248 - and will return a non-zero status and print a message if the criteria
249 are not met.
250
251 The --version-script option is used to verify that the same/compatible
252 source code versions are displayed as were used to capture coverage
253 data.
254
255 HTML output files are created in the current working directory unless
256 the --output-directory option is used. If tracefile or baseline-file
257 ends with ".gz", it is assumed to be GZIP-compressed and the gunzip
258 tool will be used to decompress it transparently.
259
260 Note that all source code files have to be present and readable at the
261 exact file system location they were compiled, and all path references
262 in the input data ".info" and "diff" files must match exactly (i.e.,
263 exact string match).
264
265 Further, the --version-script, --annotate-script, and --criteria-script
266 scripts use the same path strings. However, see the --substitute option
267 for a mechanism to adjust extracted paths so they match your source
268 and/or revision control layout.
269
270 Use option --diff-file to supply a unified diff file that represents
271 the changes to the source code files between the version used to com‐
272 pile and capture the baseline trace files, and the version used to com‐
273 pile and capture the current trace files.
274
275 Use option --css-file to modify layout and colors of the generated HTML
276 output. Files are marked in different colors depending on the associ‐
277 ated coverage rate.
278
279 By default, the coverage limits for low, medium and high coverage are
280 set to 0-75%, 75-90% and 90-100% percent respectively. To change these
281 values, use configuration file options.
282
283 genhtml_hi_limit and genhtml_med_limit
284
285 or type-specific limits:
286
287 genhtml_line_hi_limit and genhtml_line_med_limit
288 genhtml_branch_hi_limit and genhtml_branch_med_limit
289 genhtml_function_hi_limit and genhtml_function_med_limit
290
291 See the lcovrc man page for details.
292
293 Also note that when displaying percentages, 0% and 100% are only
294 printed when the values are exactly 0% and 100% respectively. Other
295 values which would conventionally be rounded to 0% or 100% are instead
296 printed as nearest non-boundary value. This behavior is in accordance
297 with that of the gcov(1) tool.
298
299
301 -h
302 --help
303 Print a short help text, then exit.
304
305 --version
306 Print version number, then exit.
307
308 -v
309 --verbose
310 Increment informational message verbosity. This is mainly used
311 for script and/or flow debugging - e.g., to figure out which
312 data files are found, where. Also see the --quiet flag.
313
314 -q
315 --quiet
316 Decrement informational message verbosity.
317
318 Decreased verbosity will suppress 'progress' messages for exam‐
319 ple - while error and warning messages will continue to be
320 printed.
321
322 --debug
323 Increment 'debug messages' verbosity. This is useful primarily
324 to developers who want to enhance the lcov tool suite.
325
326 --flat
327 --hierarchical
328 Use the specified HTML report hierarchy layout.
329
330 The default HTML report is 3 levels:
331
332 1. top-level: table of all directories,
333
334 2. directory: table of source files in a directory, and
335
336 3. source file detail: annotated source code.
337
338 Option --hierarchical produces a multilevel report which follows
339 the directory structure of the source code (similar to the file
340 tool in Microsoft Windows).
341
342 Option --flat produces a two-level HTML report:
343
344 1. top-level: table of all project source files, and
345
346 2. source file detail: annotated source code.
347
348 Only one of options --flat and --hierarchical can be specified
349 at the same time.
350
351 These options can also be persistently set via the lcovrc con‐
352 figuration file using either:
353
354 genhtml_hierarchical = 1
355
356 or
357
358 genhtml_flat_view = 1
359
360 See the lcovrc man page for details.
361
362 -f
363 --frames
364 Use HTML frames for source code view.
365
366 If enabled, a frameset is created for each source code file,
367 providing an overview of the source code as a "clickable" image.
368 Note that this option will slow down output creation noticeably
369 because each source code character has to be inspected once.
370 Note also that the GD.pm Perl module has to be installed for
371 this option to work (it may be obtained from
372 http://www.cpan.org).
373
374 -s
375 --show-details
376 Generate detailed directory view.
377
378 When this option is enabled, genhtml generates two versions of
379 each file view. One containing the standard information plus a
380 link to a "detailed" version. The latter additionally contains
381 information about which test case covered how many lines of each
382 source file.
383
384 -b baseline-file
385 --baseline-file baseline-file
386 Use data in baseline-file as coverage baseline.
387
388 The coverage data file specified by baseline-file is read and
389 used as the baseline for classifying the change in coverage rep‐
390 resented by the coverage counts in tracefile.
391
392 In general, you should specify a diff file in unified diff for‐
393 mat via --diff-file when you specify a --baseline-file. Without
394 a diff file, genhtml will assume that there are no source dif‐
395 ferences between 'baseline' and 'current'. (For example: this
396 might be used to find incremental changes caused by the addition
397 of more testcases, or to compare coverage results between gcc
398 versions, or between gcc and llvm.)
399
400 --baseline-title title
401 Use title as the descriptive label text for the source of cover‐
402 age baseline data.
403
404 --baseline-date date
405 Use date as the collection date in text format for the coverage
406 baseline data. If this argument is not specified, the default
407 is to use the creation time of the baseline-file as the baseline
408 date.
409
410 --current-date date
411 Use date as the collection date in text format for the coverage
412 baseline data. If this argument is not specified, the default
413 is to use the creation time of the current tracefile.
414
415 --diff-file diff-file
416 Use the diff-file as the definition for source file changes be‐
417 tween the sample points for baseline-file and tracefile(s).
418
419 A suitable diff-file can be generated using the command:
420
421 git diff --relative <SHA_base> <SHA_current>
422
423 or using the "p4udiff" or "gitdiff" sample scripts that are pro‐
424 vided as part of this package in the following locations:
425
426 /usr/share/lcov/support-scripts/p4udiff
427
428 and
429
430 /usr/share/lcov/support-scripts/gitdiff
431
432 p4udiff accepts either a changelist ID or the literal string
433 "sandbox"; "sandbox" indicates that there are modified files
434 which have not been checked in.
435
436 These scripts post-process the 'p4' or 'git' output to (option‐
437 ally) remove files that are not of interest and to explicitly
438 note files which have not changed. It is useful to note un‐
439 changed files denoted by lines of the form:
440
441 diff [optional header strings]
442 === file_path
443
444 in the p4diff/gitdiff output as this knowledge will help to sup‐
445 press spurious 'path mismatch' warnings. See the
446 --elide-path-mismatch option, below.
447
448 Note that you must specify --baseline-file when you specify
449 --diff-file. Both are needed for differential coverage catego‐
450 rization.
451
452 Conversely, if you specify a --baseline-file without a
453 --diff-file, then genhtml will assume that there are no source
454 code changes: source text is identical between 'baseline' and
455 'current'.
456
457
458 --annotate-script script
459 Use script to get source code annotation data.
460
461 Use this option to specify an external tool or command line that
462 genhtml can use to obtain source code annotation data such as
463 age and author of the last change for each source code line.
464
465 This option also instructs genhtml to add a summary table to the
466 HTML report header that shows counts in the various coverage
467 categories, associated with each date bin. In addition, each
468 source code line will show age and owner information.
469
470 The specified script is expected to obtain age and ownership in‐
471 formation for each source code line from the revision management
472 system and to output this information in the format described
473 below.
474
475 If the annotate script fails and annotation errors are ignored
476 via --ignore-errors, then genhtml will try to load the source
477 file normally. If the file is not present or not readable, and
478 the --synthesize-missing flag is specified, then genhtml will
479 synthesize fake data for the file.
480
481 Sample annotation scripts for Perforce ("p4annotate") and git
482 ("gitblame") are provided as part of this package in the follow‐
483 ing locations:
484
485 /usr/share/lcov/support-scripts/p4annotate
486
487 and
488
489 /usr/share/lcov/support-scripts/gitblame
490
491 Note that these scripts generate annotations from the file ver‐
492 sion checked in to the repository - not the locally modified
493 file in the build directory. If you need annotations for lo‐
494 cally modified files, you can shelve your changes in P4, or
495 check them in to a local branch in git.
496
497 Creating your own script
498
499 When creating your own script, please first see Script consider‐
500 ations above for general calling conventions and script require‐
501 ments.
502
503 script is called by genhtml with the following command line:
504
505 script [additional_parameters] source_file_name
506
507 where
508
509 script
510 is the script executable
511
512 additional_parameters
513 includes any optional parameters specified (see
514 Script conventions above)
515
516 source_file_name
517 is the source code file name
518
519 The script executable should output a line to the standard out‐
520 put stream in the following format for each line in file
521 source_file_name:
522
523 commit_id|author_id|date|source_code
524
525 where
526
527 commit_id
528 is an ID identifying the last change to the line
529
530 author_id
531 identifies the author of the last change
532
533 date
534 is the data of last change in W3CDTF format
535 (<YYYY>-<MM>-<DD>T<hh>:<mm>:<ss><TZD>)
536
537 source_code
538 is the line's source code
539
540 The script should return 0 (zero) if processing was successful
541 and non-zero if it encountered an error.
542
543 --criteria-script script
544 Use script to test for coverage acceptance criteria.
545
546 Use this option to specify an external tool or command line that
547 genhtml can use to determine if coverage results meet custom ac‐
548 ceptance criteria. Criteria checking results are shown in the
549 standard output log of genhtml. If at least one check fails,
550 genhtml will exit with a non-zero exit code after completing its
551 processing.
552
553 A sample coverage criteria script is provided as part of this
554 package in the following location:
555
556 /usr/share/lcov/support-scripts/criteria
557
558 The sample script checks that top-level line coverage meets the
559 criteria "UNC + LBC + UIC == 0" (added code and newly activated
560 code must be tested, and existing tested code must not become
561 untested).
562
563 As another example, it is possible to create scripts that mimic
564 the lcov --fail-under-lines feature by checking that the ratio
565 of exercised lines to total lines ("(GNC + GIC + CBC) / (GNC +
566 GIC + CBC + UNC + UIC + UBC)") is greater than the threshold -
567 either only at the top level, in every directory, or wherever
568 desired. Similarly, criteria may include branch and function
569 coverage metrics.
570
571 By default the criteria script is called for all source code hi‐
572 erarchy levels, i.e.: top-level, directory, and file-level. The
573 criteria_callback_levels configuration file option can be used
574 to limit the hierarchy levels to any combination of 'top', 'di‐
575 rectory', or 'file' levels.
576
577 Example:
578
579 genhtml --rc criteria_callback_levels=directory,top ...
580
581 You can increase the amount of data passed to the criteria
582 script using configuration file option criteria_callback_data.
583 By default, only total counts are included. Specifying "date"
584 adds per date-bin counts, "owner" adds per owner-bin counts.
585
586 Example:
587
588 genhtml --rc criteria_callback_data=date,owner ...
589
590 See the lcovrc man page for more details.
591
592 Creating your own script
593
594 When creating your own script, please first see Script consider‐
595 ations above for general calling conventions and script require‐
596 ments.
597
598 script is run with the following command line for each source
599 code file, leaf-directory, and top-level coverage results:
600
601 script [additional_parameters] name type json_data
602
603 where
604
605 script
606 is the script executable
607
608 additional_parameters
609 includes any optional parameters specified (see
610 Script conventions above)
611
612 name
613 is the name of the object for which coverage cri‐
614 teria should be checked, that is either the source
615 code file name, directory name, or "top" if the
616 script is called for top-level data
617
618 type
619 is the type of source code object for which cover‐
620 age criteria should be checked, that is one of
621 "file", "directory", or "top"
622
623 json_data
624 is a JSON representation of coverage data for the
625 corresponding source code object
626
627 The JSON data format is defined as follows:
628
629 {
630 "<type>": {
631 "found": <count>,
632 "hit": <count>,
633 "<category>": <count>,
634 ...
635 },
636 "<bin_type>": {
637 "<bin_id>" : {
638 "found": <count>,
639 "hit": <count>,
640 "<category>": <count>,
641 ...
642 },
643 ...
644 },
645 ...
646 }
647
648 where
649
650 type
651 specifies the type of coverage as one of "line",
652 "function", or "branch"
653
654 bin_type
655 specifies the type of per-bin coverage as one of
656 "line_age", "function_age", or "branch_age" for
657 date-bin data, and "line_owners" or "branch_own‐
658 ers" for owner-bin data
659
660 bin_id
661 specifies the date-bin index for date-bin data,
662 and owner ID for owner-bin data.
663
664 found
665 defines the number of found lines, functions, or
666 branches
667
668 hit
669 defines the number of hit lines, functions, or
670 branches
671
672 category
673 defines the number of lines, functions, or
674 branches that fall in the specified category (see
675 Differential coverage above)
676
677
678 Note that data is only reported for non-empty coverage types and
679 bins.
680
681 The script should return 0 (zero) if the criteria are met and
682 non-zero otherwise.
683
684 If desired, it may print a single line output string which will
685 be appended to the error log if the return status is non-zero.
686 Additionally, non-empty lines are appended to the genhtml stan‐
687 dard output log.
688
689
690 --version-script script
691 Use script to get source code file version data.
692
693 Use this option to specify an external tool or command line that
694 genhtml can use to obtain a source code file's version ID when
695 generating HTML or applying source filters (see --filter op‐
696 tion).
697
698 A version ID can be a file hash or commit ID from revision con‐
699 trol. It is used to check the version of the source file which
700 is loaded against the version which was used to generate cover‐
701 age data (i.e., the file version seen by lcov/geninfo). It is
702 important that source code versions match - otherwise inconsis‐
703 tent or confusing results may be produced.
704
705 Version mismatches typically happen when the tasks of capture,
706 aggregation, and report generation are split between multiple
707 jobs - e.g., when the same source code is used in multiple
708 projects, a unified/global coverage report is required, and the
709 projects accidentally use different revisions.
710
711 Sample scripts for Perforce ("getp4version") and using an md5
712 hash ("get_signature") are provided as part of this package in
713 the following locations:
714
715 /usr/share/lcov/support-scripts/getp4version
716
717 and
718
719 /usr/share/lcov/support-scripts/get_signature
720
721 Note that you must use the same script/same mechanism to deter‐
722 mine the file version when you extract, merge, and display cov‐
723 erage data - otherwise, you may see spurious mismatch reports.
724
725 Creating your own script
726
727 When creating your own script, please first see Script consider‐
728 ations above for general calling conventions and script require‐
729 ments.
730
731 script is used both to generate and to compare the version ID to
732 enable retaining history between calls or to do more complex
733 processing to determine equivalence. It will be called by gen‐
734 html with either of the following command lines:
735
736 1. Determine source file version ID
737
738 script source_file_name
739
740 It should write the version ID of source_file_name to stdout
741 and return a 0 exit status. If the file is not versioned, it
742 should write an empty string and return a 0 exit status.
743
744 2. Compare source file version IDs
745
746 script --compare source_file_name source_file_id
747 info_file_id
748
749 where
750
751 source_file_name
752 is the source code file name
753
754 source_file_id
755 is the version ID returned by calling "script
756 source_file_name"
757
758 info_file_id
759 is the version ID found in the corresponding .info
760 file
761
762 It should return non-zero if the IDs do not match.
763
764
765 --checksum
766 Specify whether to compare stored tracefile checksum to checksum
767 computed from the source code.
768
769 Checksum verification is disabled by default.
770
771 When checksum verification is enabled, a checksum will be com‐
772 puted for each source code line and compared to the checksum
773 found in the 'current' tracefile. This will help to prevent at‐
774 tempts to display source code which is not identical to the code
775 used to generate the coverage data.
776
777 Note that this option is somewhat subsumed by the --ver‐
778 sion-script option - which does something similar, but at the
779 'whole file' level.
780
781 --new-file-as-baseline
782 By default, when code is identified on source lines in the 'cur‐
783 rent' data which were not identified as code in the 'baseline'
784 data, but the source text has not changed, their coverpoints are
785 categorized as "included code": GIC or UIC.
786
787 However, if the configuration of the coverage job has been re‐
788 cently changed to instrument additional files, then all un-exer‐
789 cised coverpoints in those files will fall into the GIC category
790 - which may cause certain coverage criteria checks to fail.
791
792 When this option is specified, genhtml pretends that the base‐
793 line data for the file is the same as the current data - so cov‐
794 erpoints are categorized as CBC or UBC which do not trigger the
795 coverage criteria check.
796
797 Please note that coverpoints in the file are re-categorized only
798 if:
799
800
801 • There is no 'baseline' data for any coverpoint in this
802 file, AND
803
804 • The file pre-dates the baseline: the oldest line in
805 the file is older than the 'baseline' data file (or
806 the value specified by the --baseline-date option).
807
808 --elide-path-mismatch
809 Differential categorization uses file pathnames to match cover‐
810 age entries from the ".info" file with file difference entries
811 in the unified-diff-file. If the entries are not identical,
812 then categorization may be incorrect or strange.
813
814 When paths do not match, genhtml will produce "path" error mes‐
815 sages to tell you about the mismatches.
816
817 If mismatches occur, the best solution is to fix the incorrect
818 entries in the .info and/or unified-diff-file files. However,
819 fixing these entries is not possible, then you can use this op‐
820 tion to attempt to automatically work around them.
821
822 When this option is specified, genhtml will pretend that the
823 unified-diff-file entry matches the .info file entries if:
824
825
826 • the same path is found in both the 'baseline' and
827 'current' .info files, and
828
829 • the basename of the path in the .info file and the
830 path in the unified-diff-file are the same, and
831
832 • there is only one unmatched unified-diff-file entry
833 with that basename.
834
835 See the --diff-file discussion above for a discussion of how to
836 avoid spurious warnings and/or incorrect matches.
837
838 --synthesize-missing
839 Generate (fake) file content if source file does not exist.
840 This option can be used to work around otherwise fatal annota‐
841 tion errors.
842
843 --date-bins day[,day,...]
844 The --date-bins option is used to specify age boundaries (cut‐
845 points) for date-binning classification. If not specified, the
846 default is to use 4 age ranges: less than 7 days, 7 to 30 days,
847 30 to 180 days, and more than 180 days. This argument has no
848 effect if there is no source-annotation-script .
849
850 --show-owners [all]
851 If the --show-owners option is used, each coverage report header
852 report contain a summary table, showing counts in the various
853 coverage categories for everyone who appears in the revision
854 control annotation as the most recent editor of the correspond‐
855 ing line. If the optional argument 'all' is not specified, the
856 table will show only users who are responsible for un-exercised
857 code lines. If the optional argument is specified, then users
858 responsible for any code lines will appear. In both cases,
859 users who are responsible for non-code lines (e.g, comments) are
860 not shown. This option does nothing if --annotate-script is not
861 used; it needs revision control information provided by calling
862 the script.
863
864 Please note: if the all option is not specified, the summary ta‐
865 ble will contain "Total" rows for all date/owner bins which are
866 not empty - but there will be no secondary "File/Directory" en‐
867 tries for elements which have no "missed" coverpoints.
868
869 --show-noncode
870 By default, the source code detail view does not show owner or
871 date annotations in the far-left column for non-code lines
872 (e.g., comments). If the --show-noncode option is used, then the
873 source code view will show annotations for both code and
874 non-code lines. This argument has no effect if there is no
875 source-annotation-script .
876
877 --show-zero-columns
878 By default, columns whose entries are all zero are removed (not
879 shown) in the summary table at the top of each HTML page. If
880 the --show-zero-columns option is used, then those columns will
881 be shown.
882
883 When columns are retained, then all the tables have the same
884 width/contain the same number of columns - which may be a bene‐
885 fit in some situations.
886
887 When columns are removed, then the tables are more compact and
888 easier to read. This is especially true in relatively mature
889 development environments, when there are very few un-exercised
890 coverpoints in the project.
891
892 --show-navigation
893 By default, the summary table in the source code detail view
894 does not contain hyperlinks from the number to the first line in
895 the corresponding category ('Hit' or 'Missed') and from the cur‐
896 rent location to the next location in the current category, in
897 non-differential coverage reports. (This is the lcov 'legacy'
898 view non-differential reports.)
899
900 If the --show-navigation option is used, then the source code
901 summary table will be generated with navigation links. Hyper‐
902 links are always generated for differential coverage reports.
903
904 This feature enables developers to find and understand coverage
905 issues more quickly than they might otherwise, if they had to
906 rely on scrolling.
907
908 --show-proportions
909 In the 'function coverage detail' table, also show the percent‐
910 age of lines and branches within the function which are exer‐
911 cised.
912
913 This feature enables developers to focus attention on functions
914 which have the largest effect on overall code coverage.
915
916 This feature is disabled by default. Note that this option re‐
917 quires that you use a gcc version which is new enough to support
918 function begin/end line reports.
919
920
921 --simplified-colors
922 By default, each differential category is colorized uniquely in
923 the source code detail view. With this option, only two colors
924 are used: one for covered code and another for uncovered code.
925 Note that ECB and EUB code is neither covered nor uncovered -
926 and so may be difficult to distinguish in the source code view,
927 as they will be presented in normal background color.
928
929 --exclude pattern
930 pattern is a glob-match pattern of filenames to exclude from the
931 report. Files which do NOT match will be included. See the
932 lcov man page for details.
933
934 --include pattern
935 pattern is a glob-match pattern of filenames to include in pro‐
936 cessing. Files which do not match will be excluded from the re‐
937 port. See the lcov man page for details.
938
939 --erase-functions regexp
940 Exclude coverage data from lines which fall within a function
941 whose name matches the supplied regexp. Note that this is a
942 mangled or demangled name, depending on whether the --deman‐
943 gle-cpp option is used or not.
944
945 Note that this option requires that you use a gcc version which
946 is new enough to support function begin/end line reports.
947
948 --substitute regexp_pattern
949 Apply Perl regexp regexp_pattern to source file names found dur‐
950 ing processing. This is useful when some file paths in the
951 baseline or current .info file do not match your source layout
952 and so the source code is not found. See the lcov man page for
953 more details.
954
955 --omit-lines regexp_pattern
956 Exclude coverage data from lines whose content matches regexp.
957
958 Use this switch if you want to exclude line and branch coverage
959 data for some particular constructs in your code (e.g., some
960 complicated macro). See the lcov man page for details.
961
962 --parallel [ integer ]
963 -j [ integer ]
964 Specify parallelism to use during processing (maximum number of
965 forked child processes). If the optional integer parallelism
966 parameter is zero or is missing, then use to use up the number
967 of cores on the machine. Default is not to use a single process
968 (no parallelism).
969
970 --memory integer
971 Specify the maximum amount of memory to use during parallel pro‐
972 cessing, in Mb. Effectively, the process will not fork() if
973 this limit would be exceeded. Default is 0 (zero) - which means
974 that there is no limit.
975
976 This option may be useful if the compute farm environment im‐
977 poses strict limits on resource utilization such that the job
978 will be killed if it tries to use too many parallel children -
979 but the user does not know a priori what the permissible maximum
980 is. This option enables the tool to use maximum parallelism -
981 up to the limit imposed by the memory restriction.
982
983
984 --filter filters
985 Specify a list of coverpoint filters to apply to input data.
986
987 filters can be a comma-separated list of the following keywords:
988
989 branch: ignore branch counts for C/C++ source code lines which
990 do not appear to contain conditionals. These may be generated
991 automatically by the compiler (e.g., from C++ exception han‐
992 dling) - and are not interesting to users. This option has no
993 effect unless --branch-coverage is used.
994
995 See also the lcovrc man page - which describes several variables
996 which affect branch filtering: filter_lookahead and filter_bit‐
997 wise_conditional.
998
999 The most common use for branch filtering is to remove compiler-
1000 generated branches related to C++ exception handlers. See the
1001 no_exception_branch' option in the lcovrc man page for a way to
1002 remove all identified exception branches.
1003
1004 brace: ignore line coverage counts on the closing brace of C/C++
1005 code block, if the line contains only a closing brace and the
1006 preceding line has the same count or if the close brace has a
1007 zero count and either the preceding line has a non-zero count,
1008 or the close brace is not the body of a conditional.
1009
1010 These lines seem to appear and disappear in gcov output - and
1011 cause differential coverage to report bogus LBC and/or GIC
1012 and/or UIC counts. Bogus LBC or UIC counts are a problem be‐
1013 cause an automated regression which uses pass criteria "LBC +
1014 UIC + UNC == 0" will fail.
1015
1016 blank: ignore lines which contain only whitespace (or whitespace
1017 + comments) whose 'hit' count is zero. These appear to be a
1018 'gcov' artifact related to compiler-generated code - such as ex‐
1019 ception handlers and destructor calls at the end of scope - and
1020 can confuse differential coverage criteria.
1021
1022 range: Ignore line and branch coverpoints on lines which are
1023 out-of range/whose line number is beyond the end of the source
1024 file. These appear to be gcov artifacts caused by a macro in‐
1025 stantiation on the last line of the file.
1026
1027 line: alias for "--filter brace,blank".
1028
1029 region: apply LCOV_EXCL_START/LCOV_EXCL_STOP directives found in
1030 source text to the coverpoints found in the current and baseline
1031 .info files. This option may be useful in cases that the source
1032 code was not found during 'lcov --capture ...' but is accessible
1033 now.
1034
1035 branch_region: apply LCOV_EXCL_BR_START/LCOV_EXCL_BR_STOP direc‐
1036 tives found in source text to the coverpoints found in the cur‐
1037 rent and baseline .info files. This is similar to the 'region
1038 option, above - but applies to branch coverpoints only.
1039
1040 function: combine data for every "unique" function which is de‐
1041 fined at the same file/line. geninfo/gcov seem to have a bug
1042 such that they create multiple entries for the same function.
1043 This feature also merges all instances of the same template
1044 function/template method.
1045
1046 trivial: remove trivial functions and associated coverpoints.
1047 'Trivial' functions are whose body is empty/do not contain any
1048 statements. Commonly, these include compiler-generated methods
1049 (e.g., default constructors and assignment operators) as well as
1050 static initialization wrappers, etc.
1051
1052 Note that this filter requires function end line information -
1053 and so requires that you use a gcc veraion which is new enough
1054 to support begin/end line reports: gcc/9 or newer, or that you
1055 enable lcov/genhtml/geninfo to derive the information:
1056
1057 In the lcovrc man page, see the derive_function_end_line setting
1058 as well as the trivial_function_threshold setting. The former
1059 is used to turn end line calculation on or off, and the latter
1060 to change the lookahead used to determine whether the function
1061 body is empty.
1062
1063 -o output-directory
1064 --output-directory output-directory
1065 Create files in output-directory.
1066
1067 Use this option to tell genhtml to write the resulting files to
1068 a directory other than the current one. If output-directory does
1069 not exist, it will be created.
1070
1071 It is advisable to use this option since depending on the
1072 project size, a lot of files and subdirectories may be created.
1073
1074 -t title
1075 --title title
1076 Display title in header table of all pages.
1077
1078 title is written to the "Test:"-field in the header table at the
1079 top of each generated HTML page to identify the context in which
1080 a particular output was created. By default, this is the name of
1081 the 'current; tracefile.
1082
1083 A common use is to specify a test run name, or a version control
1084 system identifier (perforce changelist or git SHA, for example)
1085 that indicates the code level that was tested.
1086
1087 --header-title BANNER
1088 Display BANNER in header of all pages.
1089
1090 BANNER is written to the header portion of each generated HTML
1091 page. By default, this simply identifies this as an LCOV (dif‐
1092 ferential) coverage report.
1093
1094 A common use is to specify the name of the project or project
1095 branch and the Jenkins build ID.
1096
1097 --footer FOOTER
1098 Display FOOTER in footer of all pages.
1099
1100 FOOTER is written to the footer portion of each generated HTML
1101 page. The default simply identifies the LCOV tool version used
1102 to generate the report.
1103
1104 -d description-file
1105 --description-file description-file
1106 Read test case descriptions from description-file.
1107
1108 All test case descriptions found in description-file and refer‐
1109 enced in the input data file are read and written to an extra
1110 page which is then incorporated into the HTML output.
1111
1112 The file format of description-file is:
1113
1114 for each test case:
1115 TN:<testname>
1116 TD:<test description>
1117
1118
1119 Valid test case names can consist of letters, numbers and the
1120 underscore character ('_').
1121
1122 -k
1123 --keep-descriptions
1124 Do not remove unused test descriptions.
1125
1126 Keep descriptions found in the description file even if the cov‐
1127 erage data indicates that the associated test case did not cover
1128 any lines of code.
1129
1130 This option can also be configured permanently using the config‐
1131 uration file option genhtml_keep_descriptions.
1132
1133 -c css-file
1134 --css-file css-file
1135 Use external style sheet file css-file.
1136
1137 Using this option, an extra .css file may be specified which
1138 will replace the default one. This may be helpful if the default
1139 colors make your eyes want to jump out of their sockets :)
1140
1141 This option can also be configured permanently using the config‐
1142 uration file option genhtml_css_file.
1143
1144 --source-directory dirname
1145 Add 'dirname' to the list of places to look for source files.
1146
1147 For relative paths listed in tracefile, genhtml will first look
1148 for the path from 'cwd' (where genhtml was invoked) and then
1149 from each alternate directory name in the order specified. The
1150 first location matching location is used.
1151
1152 This option can be specified multiple times, to add more direc‐
1153 tories to the source search path.
1154
1155
1156 -p prefix
1157 --prefix prefix
1158 Remove prefix from all directory names.
1159
1160 Because lists containing long filenames are difficult to read,
1161 there is a mechanism implemented that will automatically try to
1162 shorten all directory names on the overview page beginning with
1163 a common prefix. By default, this is done using an algorithm
1164 that tries to find the prefix which, when applied, will minimize
1165 the resulting sum of characters of all directory names.
1166
1167 Use this option to specify the prefix to be removed by yourself.
1168
1169 --no-prefix
1170 Do not remove prefix from directory names.
1171
1172 This switch will completely disable the prefix mechanism de‐
1173 scribed in the previous section.
1174
1175 This option can also be configured permanently using the config‐
1176 uration file option genhtml_no_prefix.
1177
1178 --no-source
1179 Do not create source code view.
1180
1181 Use this switch if you don't want to get a source code view for
1182 each file.
1183
1184 This option can also be configured permanently using the config‐
1185 uration file option genhtml_no_source.
1186
1187 --num-spaces spaces
1188 Replace tabs in source view with num spaces.
1189
1190 Default value is 8.
1191
1192 This option can also be configured permanently using the config‐
1193 uration file option genhtml_num_spaces.
1194
1195 --highlight
1196 Highlight lines with converted-only coverage data.
1197
1198 Use this option in conjunction with the --diff option of lcov to
1199 highlight those lines which were only covered in data sets which
1200 were converted from previous source code versions.
1201
1202 This option can also be configured permanently using the config‐
1203 uration file option genhtml_highlight.
1204
1205 --legend
1206 Include color legend in HTML output.
1207
1208 Use this option to include a legend explaining the meaning of
1209 color coding in the resulting HTML output.
1210
1211 This option can also be configured permanently using the config‐
1212 uration file option genhtml_legend.
1213
1214 --html-prolog prolog-file
1215 Read customized HTML prolog from prolog-file.
1216
1217 Use this option to replace the default HTML prolog (the initial
1218 part of the HTML source code leading up to and including the
1219 <body> tag) with the contents of prolog-file. Within the prolog
1220 text, the following words will be replaced when a page is gener‐
1221 ated:
1222
1223 @pagetitle@
1224 The title of the page.
1225
1226 @basedir@
1227 A relative path leading to the base directory (e.g., for locat‐
1228 ing css-files).
1229
1230 This option can also be configured permanently using the config‐
1231 uration file option genhtml_html_prolog.
1232
1233 --html-epilog epilog-file
1234 Read customized HTML epilog from epilog-file.
1235
1236 Use this option to replace the default HTML epilog (the final
1237 part of the HTML source including </body>) with the contents of
1238 epilog-file.
1239
1240 Within the epilog text, the following words will be replaced
1241 when a page is generated:
1242
1243 @basedir@
1244 A relative path leading to the base directory (e.g., for locat‐
1245 ing css-files).
1246
1247 This option can also be configured permanently using the config‐
1248 uration file option genhtml_html_epilog.
1249
1250 --html-extension extension
1251 Use customized filename extension for generated HTML pages.
1252
1253 This option is useful in situations where different filename ex‐
1254 tensions are required to render the resulting pages correctly
1255 (e.g., php). Note that a '.' will be inserted between the file‐
1256 name and the extension specified by this option.
1257
1258 This option can also be configured permanently using the config‐
1259 uration file option genhtml_html_extension.
1260
1261 --html-gzip
1262 Compress all generated html files with gzip and add a .htaccess
1263 file specifying gzip-encoding in the root output directory.
1264
1265 Use this option if you want to save space on your webserver. Re‐
1266 quires a webserver with .htaccess support and a browser with
1267 support for gzip compressed html.
1268
1269 This option can also be configured permanently using the config‐
1270 uration file option genhtml_html_gzip.
1271
1272 --sort
1273 --no-sort
1274 Specify whether to include sorted views of file and directory
1275 overviews.
1276
1277 Use --sort to include sorted views or --no-sort to not include
1278 them. Sorted views are enabled by default.
1279
1280 When sorted views are enabled, each overview page will contain
1281 links to views of that page sorted by coverage rate.
1282
1283 This option can also be configured permanently using the config‐
1284 uration file option genhtml_sort.
1285
1286 --function-coverage
1287 --no-function-coverage
1288 Specify whether to display function coverage summaries in HTML
1289 output.
1290
1291 Use --function-coverage to enable function coverage summaries or
1292 --no-function-coverage to disable it. Function coverage sum‐
1293 maries are enabled by default.
1294
1295 This option can also be configured permanently using the config‐
1296 uration file option genhtml_function_coverage.
1297
1298 When function coverage summaries are enabled, each overview page
1299 will contain the number of functions found and hit per file or
1300 directory, together with the resulting coverage rate. In addi‐
1301 tion, each source code view will contain a link to a page which
1302 lists all functions found in that file plus the respective call
1303 count for those functions. The function coverage page groups
1304 the data for every alias of each function, sorted by name or ex‐
1305 ecution count. The representative name of the group of func‐
1306 tions is the shorted (i.e., containing the fewest characters).
1307
1308 If using differential coverage and a sufficiently recent gcc
1309 version which report both begin and end line of functions (gcc/9
1310 and newer), functions are considered 'new' if any of their
1311 source lines have changed. With older gcc versions, functions
1312 are considered 'new' if the function signature has changed or if
1313 the entire function is new.
1314
1315 --branch-coverage
1316 --no-branch-coverage
1317 Specify whether to display branch coverage data in HTML output.
1318
1319 Use --branch-coverage to enable branch coverage display or
1320 --no-branch-coverage to disable it. Branch coverage data display
1321 is disabled by default.
1322
1323 When branch coverage display is enabled, each overview page will
1324 contain the number of branches found and hit per file or direc‐
1325 tory, together with the resulting coverage rate. In addition,
1326 each source code view will contain an extra column which lists
1327 all branches of a line with indications of whether the branch
1328 was taken or not. Branches are shown in the following format:
1329
1330 ' + ': Branch was taken at least once
1331 ' - ': Branch was not taken
1332 ' # ': The basic block containing the branch was never executed
1333
1334 Note that it might not always be possible to relate branches to
1335 the corresponding source code statements: during compilation,
1336 GCC might shuffle branches around or eliminate some of them to
1337 generate better code.
1338
1339 This option can also be configured permanently using the config‐
1340 uration file option genhtml_branch_coverage.
1341
1342 --demangle-cpp [param]
1343 Specify whether to demangle C++ function names.
1344
1345 Use this option if you want to convert C++ internal function
1346 names to human readable format for display on the HTML function
1347 overview page.
1348
1349 If called with no parameters, genhtml will use c++filt for de‐
1350 mangling. This requires that the c++filt tool is installed (see
1351 c++filt(1)).
1352
1353 If param is specified, it is treated as th tool to call to de‐
1354 mangle source code. The --demangle-cpp option can be used mul‐
1355 tiple times to specify the demangling tool and a set of command
1356 line options that are passed to the tool - similar to how the
1357 gcc -Xlinker paramter works. In that case, you callback will be
1358 executed as: | demangle_param0 demangle_param1 ... Note that
1359 the demangle tool is called as a pipe and is expected to read
1360 from stdin and write to stdout.
1361
1362 --ignore-errors errors
1363 Specify a list of errors after which to continue processing.
1364
1365 Use this option to specify a list of error classes after which
1366 genhtml should continue processing with a warning message in‐
1367 stead of aborting. To suppress the warning message, specify the
1368 error class twice.
1369
1370 errors can be a comma-separated list of the following keywords:
1371
1372 annotate: --annotate-script returned non-zero exit status -
1373 likely a file path or related error. HTML source code display
1374 will not be correct and ownership/date information may be miss‐
1375 ing.
1376
1377 branch: Branch ID (2nd field in the .info file 'BRDA' entry)
1378 does not follow expected integer sequence.
1379
1380 callback: Annotate, version, or criteria script error.
1381
1382 category: Line number categorizations are incorrect in the .info
1383 file, so branch coverage line number turns out to not be an exe‐
1384 cutable source line.
1385
1386 count: An excessive number of messages of some class has been
1387 reported - subsequent messages of that type will be suppressed.
1388 The limit can be controlled by the 'max_message_count' variable.
1389 See the lcovrc man page.
1390
1391 corrupt: Corrupt/unreadable coverage data file found.
1392
1393 deprecated: You are using a deprecated option. This option will
1394 be removed in an upcoming release - so you should change your
1395 scripts now.
1396
1397 empty: The patch file specified by the --diff-file argument does
1398 not contain any differences. This may be OK if there were no
1399 source code changes between 'baseline' and 'current' (e.g., the
1400 only change was to modify a Makefile) - or may indicate an un‐
1401 supported file format.
1402
1403 format: Unexpected syntax found in .info file.
1404
1405 inconsistent: Files have been moved or repository history pre‐
1406 sented by --diff-file data is not consistent with coverage data;
1407 for example, an 'inserted' line has baseline coverage data.
1408 These issues are likely to be caused by inconsistent handling in
1409 the 'diff' and 'annotate' scripts.
1410
1411 mismatch: Inconsistent entries found in trace file:
1412
1413
1414 • branch expression (3rd field in the .info file 'BRDA' entry)
1415 of merge data does not match, or
1416
1417 • function execution count (FNDA:...) but no function declara‐
1418 tion (FN:...).
1419
1420 negative: negative 'hit' count found.
1421
1422 Note that negative counts may be caused by a known GCC bug - see
1423
1424 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68080
1425
1426 and try compiling with "-fprofile-update=atomic". You will need
1427 to recompile, re-run your tests, and re-capture coverage data.
1428
1429 package: A required perl package is not installed on your sys‐
1430 tem. In some cases, it is possible to ignore this message and
1431 continue - however, certain features will be disabled in that
1432 case.
1433
1434 parallel: Various types of errors related to parallelism - e.g.,
1435 child process died due to some error. If you see an error re‐
1436 lated to parallel execution, it may be a good idea to remove the
1437 --parallel flag and try again.
1438
1439 path: File name found in --diff-file file but does not appear in
1440 either baseline or current trace data. These may be mapping is‐
1441 sues - different pathname in the tracefile vs. the diff file.
1442
1443 source: The source code file for a data set could not be found.
1444
1445 unmapped: Coverage data for a particular line cannot be found,
1446 possibly because the source code was not found, or because the
1447 line number mapping in the .info file is wrong.
1448
1449 This can happen if the source file used in HTML generation is
1450 not the same as the file used to generate the coverage data -
1451 for example, lines have been added or removed.
1452
1453 unsupported: The requested feature is not supported for this
1454 tool configuration. For example, function begin/end line range
1455 exclusions use some GCOV features that are not available in
1456 older GCC releases.
1457
1458 unused: The include/exclude/erase/substitute/omit pattern did
1459 not match any file pathnames.
1460
1461 version: --version-script comparison returned non-zero mismatch
1462 indication. It likely that the version of the file which was
1463 used in coverage data extraction is different than the source
1464 version which was found. File annotations may be incorrect.
1465
1466 Also see 'man lcovrc' for a discussion of the 'max_mes‐
1467 sage_count' parameter which can be used to control the number of
1468 warnings which are emitted before all subsequent messages are
1469 suppressed. This can be used to reduce log file volume.
1470
1471 --keep-going
1472 Do not stop if error occurs: attempt to generate a result, how‐
1473 ever flawed.
1474
1475 This command line option corresponds to the stop_on_error lcovrc
1476 option. See the lcovrc man page for more details.
1477
1478
1479 --config-file config-file
1480 Specify a configuration file to use. See the lcovrc man page
1481 for details of the file format and options.
1482
1483 When this option is specified, neither the system-wide configu‐
1484 ration file /etc/lcovrc, nor the per-user configuration file
1485 ~/.lcovrc is read.
1486
1487 This option may be useful when there is a need to run several
1488 instances of genhtml with different configuration file options
1489 in parallel.
1490
1491 Note that this option must be specified in full - abbreviations
1492 are not supported.
1493
1494
1495 --rc keyword=value
1496 Override a configuration directive.
1497
1498 Use this option to specify a keyword=value statement which over‐
1499 rides the corresponding configuration statement in the lcovrc
1500 configuration file. You can specify this option more than once
1501 to override multiple configuration statements. See lcovrc(5)
1502 for a list of available keywords and their meaning.
1503
1504 --precision num
1505 Show coverage rates with num number of digits after the decimal
1506 point.
1507
1508 Default value is 1.
1509
1510 This option can also be configured permanently using the config‐
1511 uration file option genhtml_precision.
1512
1513 --suppress-aliases
1514 Suppress list of aliases in function detail table.
1515
1516 Functions whose file/line is the same are considered to be
1517 aliases; genthml uses the shortest name in the list of aliases
1518 (fewest characters) as the leader.
1519
1520 The number of aliases can be large, for example due to instanti‐
1521 ated templates - which can make function coverage results diffi‐
1522 cult to read. This option removes the list of aliases, making
1523 it easier to focus on the overall function coverage number,
1524 which is likely more interesting.
1525
1526 Note that this option has an effect only when --filter function
1527 is applied.
1528
1529 This option can also be configured permanently using the config‐
1530 uration file option suppress_function_aliases.
1531
1532
1533 --forget-test-names
1534 If non-zero, ignore testcase names in .info file - i.e., treat
1535 all coverage data as if it came from the same testcase. This
1536 may improve performance and reduce memory consumption if user
1537 does not need per-testcase coverage summary in coverage reports.
1538
1539 This option can also be configured permanently using the config‐
1540 uration file option forget_testcase_names.
1541
1542 --missed
1543 Show counts of missed lines, functions, or branches.
1544
1545 Use this option to change overview pages to show the count of
1546 lines, functions, or branches that were not hit. These counts
1547 are represented by negative numbers.
1548
1549 When specified together with --sort, file and directory views
1550 will be sorted by missed counts.
1551
1552 This option can also be configured permanently using the config‐
1553 uration file option genhtml_missed.
1554
1555 --dark-mode
1556 Use a light-display-on-dark-background color scheme rather than
1557 the default dark-display-on-light-background.
1558
1559 The idea is to reduce eye strain due to viewing dark text on a
1560 bright screen - particularly at night.
1561
1562 --tempdir dirname
1563 Write temporary and intermediate data to indicated directory.
1564 Default is "/tmp".
1565
1566 --preserve
1567 Preserve intermediate data files generated by various steps in
1568 the tool - e.g., for debugging. By default, these files are
1569 deleted.
1570
1571
1572 --save
1573 Copy unified-diff-file, baseline_trace_file, and tracefile(s) to
1574 output-directory.
1575
1576 Keeping copies of the input data files may help to debug any is‐
1577 sues or to regenerate report files later.
1578
1579
1580
1582 /etc/lcovrc
1583 The system-wide configuration file.
1584
1585 ~/.lcovrc
1586 The per-user configuration file.
1587
1588 /usr/share/lcov/support-scripts/p4udiff
1589 Sample script for use with --diff-file that creates a unified
1590 diff file via Perforce.
1591
1592 /usr/share/lcov/support-scripts/gitdiff
1593 Sample script for use with --diff-file that creates a unified
1594 diff file via git.
1595
1596 /usr/share/lcov/support-scripts/p4annotate
1597 Sample script for use with --annotate-script that provides anno‐
1598 tation data via Perforce.
1599
1600 /usr/share/lcov/support-scripts/gitblame
1601 Sample script for use with --annotate-script that provides anno‐
1602 tation data via git.
1603
1604 /usr/share/lcov/support-scripts/criteria
1605 Sample script for use with --criteria-script that implements a
1606 check for "UNC + LBC + UIC == 0".
1607
1608 /usr/share/lcov/support-scripts/getp4version
1609 Sample script for use with --version-script that obtains version
1610 IDs via Perforce.
1611
1612 /usr/share/lcov/support-scripts/get_signature
1613 Sample script for use with --version-script that uses md5hash as
1614 version IDs.
1615
1616
1617
1619 Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
1620
1621 Henry Cox <henry.cox@mediatek.com>
1622 Differential coverage and date/owner binning, filtering, error
1623 management, parallel execution sections,
1624
1625
1627 lcov(1), lcovrc(5), geninfo(1), genpng(1), gendesc(1), gcov(1)
1628
1629 https://github.com/linux-test-project/lcov
1630
1631
1632
16332023-11-27 LCOV 2.0 genhtml(1)