Open source: xcov

Project :    https://code.google.com/p/xcov/

Short introduce:   enhance lcov-to-cobertura-xml to support converting gcov to coberuta and working with svn diff

Open source project lcov-to-cobertura-xml provide converting the lcov data to cobertura xml so that it can be easier integrated with Jenkins.

Thus, we have to handle the gcov data at first instead of lcov sometimes, What’s more, we only want to generate code coverage with svn code diff. So this tool enhance the lcov-to-cobertura-xml to support convert gcov data or work with svn diff file base on keeping the old features available.

Basic Usage:

Converts LCOV coverage data to Coberturacompatible XML for reporting. By default, XML output will be written to ./coverage.xml

xcov.py lcovfile.info
xcov.py lcov-file-1.info lcov-file-2.info
xcov.py lcov-file.info -s svndiffFilePath
xcov.py lcovfile.info -a srcPath:gcdaPath
xcov.py -a srcPath:gcdaPath
xcov.py lcovfile.info b src/dir e test.lib o path/out.xml

Options:

-h, –help show this help message and exit -b BASE_DIR, –base-dir=BASE_DIR

Directory where source files are located

-e EXCLUDES, –excludes=EXCLUDES

Comma-separated list of regexes of packages to exclude

-a SRCDSTPAIRS, –srcdstPairs=SRCDSTPAIRS

add src:dst path, the src path is source code path, the dst path is gcda/gcno path

-o OUTPUT, –output=OUTPUT

Path to store cobertura xml file

-w, –web

create html report

-d, –delete

delete the copied gcov data

-s, –svndiff

Path to store svn diff file path

By default

(1) gcdaPath=gcnoPath=objsPath

(2) XML output will be written to ./coverage.xml

(3) svndiffFilePath can be generated by svn diff command with option –summarize such as: svn diff -r {2014-05-01}:{2014-05-10} src/ –summarize > svndifffile.txt

发布者

傅, 健

程序员,Java、C++、开源爱好者. About me

发表评论