Skip to content

Commit f18d34d

Browse files
committed
Add 'xml2lcov' utility - to convert XML coverage data - e.g.,
produced by Cobertura - to lcov format. Signed-off-by: Henry Cox <[email protected]>
1 parent b36f2ee commit f18d34d

File tree

11 files changed

+4316
-346
lines changed

11 files changed

+4316
-346
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FILES := README Makefile lcovrc \
6666
DIST_CONTENT := CONTRIBUTING COPYING README Makefile lcovrc \
6767
bin example lib man rpm scripts tests
6868

69-
EXES = lcov genhtml geninfo genpng gendesc perl2lcov py2lcov
69+
EXES = lcov genhtml geninfo genpng gendesc perl2lcov py2lcov xml2lcov xml2lcovutil.py
7070
# there may be both public and non-public user scripts - so lets not show
7171
# any of their names
7272
SCRIPTS = $(shell ls scripts | grep -v -E '([\#\~]|\.orig|\.bak|\.BAK)' )

README

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-------------------------------------------------
22
- README file for the LTP GCOV extension (LCOV) -
3-
- Last changes: 2023-02-22
3+
- Last changes: 2024-03-21
44
-------------------------------------------------
55

66
Description
@@ -60,6 +60,8 @@ Further README contents
6060
bin/gendesc - Tool for creating description files as used by genhtml
6161
bin/perl2lcov - Tool to translate Perl Devel::Cover data to lcov format
6262
bin/py2lcov - Tool to translate Python Coverage.py to lcov format
63+
bin/xml2lcov - Tool to translate Cobertura-like XML coverage data
64+
to lcov format
6365
bin/geninfo - Internal tool (creates LCOV data files)
6466
bin/genpng - Internal tool (creates png overviews of source files)
6567
man - Directory containing man pages for included tools
@@ -253,6 +255,15 @@ Point the web browser of your choice to the resulting index.html file.
253255
See 'perl2lcov --help' and the Devel::Cover documentation for more
254256
information.
255257

258+
iv) XML data (for example, generated by Cobertura):
259+
260+
- translate XM coverage data to LCOV format:
261+
262+
$ xml2lcov --output myData.info coverage.xml [xml2lcov options]
263+
264+
See 'xml2lcov --help' and the Cobertura documentation for more
265+
information.
266+
256267
b) Generate an HTML coverage report:
257268

258269
Generate an HTML report, combining all of your LCOV data files:
@@ -413,7 +424,7 @@ New features and capabilities fall into 7 major categories:
413424

414425
g) Language support
415426

416-
Added 'py2lcov' and 'perl2lcov' scripts.
427+
Added 'py2lcov', 'perl2lcov' and 'xml2lcov' scripts.
417428

418429
- py2lcov:
419430

@@ -435,6 +446,16 @@ New features and capabilities fall into 7 major categories:
435446
Note that perl2lcov uses a similar set of command line and
436447
config file options as lcov, genhtml, and geninfo.
437448

449+
- xml2lcov
450+
451+
translates XML coverage data to lcov format.
452+
The XML data may come from Cobertura or similar tools.
453+
454+
See "xml2lcov --help" fir brief instructions on how to use
455+
the translator.
456+
See the Coburtura documention for directions on how to
457+
generate XML data.
458+
438459
Other languages can be integrated using a similar approach.
439460

440461
In general, the new features and options are implemented uniformly in lcov,

0 commit comments

Comments
 (0)