1genhtml(1)                       User Manuals                       genhtml(1)
2
3
4

NAME

6       genhtml - Generate HTML view from LCOV coverage data files
7

SYNOPSIS

9       genhtml [-h|--help] [-v|--version]
10               [-q|--quiet] [-s|--show-details] [-f|--frames]
11               [-b|--baseline-file] baseline-file
12               [-o|--output-directory output-directory]
13               [-t|--title title]
14               [-d|--description-file description-file]
15               [-k|--keep-descriptions] [-c|--css-file css-file]
16               [-p|--prefix prefix] [--no-prefix]
17               [--no-source] [--num-spaces num] [--highlight]
18               [--legend] [--html-prolog prolog-file]
19               [--html-epilog epilog-file] [--html-extension extension]
20               tracefile(s)
21

DESCRIPTION

23       Create  an  HTML  view  of coverage data found in tracefile.  Note that
24       tracefile may also be a list of filenames.
25
26       HTML output files are created in the current working  directory  unless
27       the --output-directory option is used. If tracefile ends with ".gz", it
28       is assumed to be GZIP-compressed and the gunzip tool will  be  used  to
29       decompress it transparently.
30
31       Note  that all source code files have to be present and readable at the
32       exact file system location they were compiled.
33
34       Use option --css-file to modify layout and colors of the generated HTML
35       output.  Files  are marked in different colors depending on the associ‐
36       ated coverage rate. By default, the coverage limits for low, medium and
37       high  coverage  are  set  to  0-15%, 15-50% and 50-100% percent respec‐
38       tively. To change these values, use  configuration  file  options  gen‐
39       html_hi_limit and genhtml_med_limit.
40
41

OPTIONS

43       -h
44       --help
45              Print a short help text, then exit.
46
47       -v
48       --version
49              Print version number, then exit.
50
51       -q
52       --quiet
53              Do not print progress messages.
54
55              Suppresses  all  informational progress output. When this switch
56              is enabled, only error or warning messages are printed.
57
58       -f
59       --frames
60              Use HTML frames for source code view.
61
62              If enabled, a frameset is created for  each  source  code  file,
63              providing an overview of the source code as a "clickable" image.
64              Note that this option will slow down output creation  noticeably
65              because  each  source  code  character has to be inspected once.
66              Note also that the GD.pm PERL module has  to  be  installed  for
67              this    option    to    work    (it   may   be   obtained   from
68              http://www.cpan.org).
69
70       -s
71       --show-details
72              Generate detailed directory view.
73
74              When this option is enabled, genhtml generates two  versions  of
75              each  file  view. One containing the standard information plus a
76              link to a "detailed" version. The latter  additionally  contains
77              information about which test case covered how many lines of each
78              source file.
79
80       -b baseline-file
81       --baseline-file baseline-file
82              Use data in baseline-file as coverage baseline.
83
84              The tracefile specified by baseline-file is read and all  counts
85              found  in  the  original tracefile are decremented by the corre‐
86              sponding counts in baseline-file before creating any output.
87
88              Note that when a count for a particular line in baseline-file is
89              greater than the count in the tracefile, the result is zero.
90
91       -o output-directory
92       --output-directory output-directory
93              Create files in output-directory.
94
95              Use  this option to tell genhtml to write the resulting files to
96              a directory other than the current one. If output-directory does
97              not exist, it will be created.
98
99              It  is  advisable  to  use  this  option  since depending on the
100              project size, a lot of files and subdirectories may be created.
101
102       -t title
103       --title title
104              Display title in header of all pages.
105
106              title is written to the header portion of  each  generated  HTML
107              page  to  identify  the context in which a particular output was
108              created. By default this is the name of the tracefile.
109
110       -d description-file
111       --description-file description-file
112              Read test case descriptions from description-file.
113
114              All test case descriptions found in description-file and  refer‐
115              enced  in  the  input data file are read and written to an extra
116              page which is then incorporated into the HTML output.
117
118              The file format of description-file is:
119
120              for each test case:
121                     TN:<testname>
122                     TD:<test description>
123
124
125              Valid test case names can consist of letters,  numbers  and  the
126              underscore character ('_').
127       -k
128       --keep-descriptions
129              Do not remove unused test descriptions.
130
131              Keep descriptions found in the description file even if the cov‐
132              erage data indicates that the associated test case did not cover
133              any lines of code.
134
135              This option can also be configured permanently using the config‐
136              uration file option genhtml_keep_descriptions.
137
138       -c css-file
139       --css-file css-file
140              Use external style sheet file css-file.
141
142              Using this option, an extra .css file  may  be  specified  which
143              will replace the default one. This may be helpful if the default
144              colors make your eyes want to jump out of their sockets :)
145
146              This option can also be configured permanently using the config‐
147              uration file option genhtml_css_file.
148
149       -p prefix
150       --prefix prefix
151              Remove prefix from all directory names.
152
153              Because  lists  containing long filenames are difficult to read,
154              there is a mechanism implemented that will automatically try  to
155              shorten  all directory names on the overview page beginning with
156              a common prefix. By default, this is  done  using  an  algorithm
157              that tries to find the prefix which, when applied, will minimize
158              the resulting sum of characters of all directory names.
159
160              Use this option to specify the prefix to be removed by yourself.
161
162       --no-prefix
163              Do not remove prefix from directory names.
164
165              This  switch  will  completely  disable  the  prefix   mechanism
166              described in the previous section.
167
168              This option can also be configured permanently using the config‐
169              uration file option genhtml_no_prefix.
170
171       --no-source
172              Do not create source code view.
173
174              Use this switch if you don't want to get a source code view  for
175              each file.
176
177              This option can also be configured permanently using the config‐
178              uration file option genhtml_no_source.
179
180       --num-spaces spaces
181              Replace tabs in source view with num spaces.
182
183              Default value is 8.
184
185              This option can also be configured permanently using the config‐
186              uration file option genhtml_num_spaces.
187
188       --highlight
189              Highlight lines with converted-only coverage data.
190
191              Use this option in conjunction with the --diff option of lcov to
192              highlight those lines which were only covered in data sets which
193              were converted from previous source code versions.
194
195              This option can also be configured permanently using the config‐
196              uration file option genhtml_highlight.
197
198       --legend
199              Include color legend in HTML output.
200
201              Use this option to include a legend explaining  the  meaning  of
202              color coding in the resulting HTML output.
203
204              This option can also be configured permanently using the config‐
205              uration file option genhtml_legend.
206
207       --html-prolog prolog-file
208              Read customized HTML prolog from prolog-file.
209
210              Use this option to replace the default HTML prolog (the  initial
211              part  of  the  HTML  source code leading up to and including the
212              <body> tag) with the contents of prolog-file.  Within the prolog
213              text, the following words will be replaced when a page is gener‐
214              ated:
215
216              @pagetitle@
217              The title of the page.
218
219              @basedir@
220              A relative path leading to the base directory (e.g. for locating
221              css-files).
222
223              This option can also be configured permanently using the config‐
224              uration file option genhtml_html_prolog.
225
226       --html-epilog epilog-file
227              Read customized HTML epilog from epilog-file.
228
229              Use this option to replace the default HTML  epilog  (the  final
230              part  of the HTML source including </body>) with the contents of
231              epilog-file.
232
233              Within the epilog text, the following  words  will  be  replaced
234              when a page is generated:
235
236              @basedir@
237              A relative path leading to the base directory (e.g. for locating
238              css-files).
239
240              This option can also be configured permanently using the config‐
241              uration file option genhtml_html_epilog.
242
243       --html-extension extension
244
245              Use customized filename extension for generated HTML pages.
246
247              This  option  is  useful  in situations where different filename
248              extensions are required to render the resulting pages  correctly
249              (e.g.  php).  Note that a '.' will be inserted between the file‐
250              name and the extension specified by this option.
251
252              This option can also be configured permanently using the config‐
253              uration file option genhtml_html_extension.
254
255

FILES

257       /etc/lcovrc
258              The system-wide configuration file.
259
260       ~/.lcovrc
261              The per-user configuration file.
262
263

AUTHOR

265       Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
266
267

SEE ALSO

269       lcov(1), geninfo(1), genpng(1), gendesc(1), gcov(1)
270
271
272
2732007-08-20                         lcov 1.6                         genhtml(1)
Impressum