• Stars
    star
    185
  • Rank 207,088 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 13 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Converts lcov output to Cobertura-compatible XML for CI

lcov to cobertura XML converter

CI Docs Security check - Bandit Release

This project does as the name implies: it converts code coverage report files in lcov format to Cobertura's XML report format so that CI servers like Jenkins can aggregate results and determine build stability etc.

Coverage metrics supported:

  • Package/folder overall line and branch coverage
  • Class/file overall line and branch coverage
  • Functions hit
  • Line and Branch hits

Quick usage

Grab it raw and run it with python:

python lcov_cobertura.py lcov-file.dat
  • -b/--base-dir - (Optional) Directory where source files are located. Defaults to the current directory
  • -e/--excludes - (Optional) Comma-separated list of regexes of packages to exclude
  • -o/--output - (Optional) Path to store cobertura xml file. Defaults to ./coverage.xml
  • -d/--demangle - (Optional) Demangle C++ function names. Requires c++filt
python lcov_cobertura.py lcov-file.dat --base-dir src/dir --excludes test.lib --output build/coverage.xml --demangle

With pip:

pip install lcov_cobertura

Command-line usage

lcov_cobertura lcov-file.dat
  • -b/--base-dir - (Optional) Directory where source files are located. Defaults to the current directory
  • -e/--excludes - (Optional) Comma-separated list of regexes of packages to exclude
  • -o/--output - (Optional) Path to store cobertura xml file. Defaults to ./coverage.xml
  • -d/--demangle - (Optional) Demangle C++ function names. Requires c++filt
lcov_cobertura lcov-file.dat --base-dir src/dir --excludes test.lib --output build/coverage.xml --demangle

Usage as a Python module

Use it anywhere in your python:

from lcov_cobertura import LcovCobertura

LCOV_INPUT = 'SF:foo/file.ext\nDA:1,1\nDA:2,0\nend_of_record\n'
converter = LcovCobertura(LCOV_INPUT)
cobertura_xml = converter.convert()
print(cobertura_xml)

Environment Support

Python 3.8+ is supported. The last release with Python 2.x support is version 1.6.

Contributions

This project is made possible due to the efforts of these fine people:

License

This project is provided under the Apache License, Version 2.0.

More Repositories

1

gradle-js-plugin

Gradle plugin for working with JS
JavaScript
381
star
2

gradle-css-plugin

Gradle plugin for working with CSS
JavaScript
127
star
3

smap.js

A forward polyfill for ES6 Maps/Awesome Map util methods
JavaScript
50
star
4

dotfiles

System config
Shell
30
star
5

es6-map-shim

Implements the evolving ES6 Map specification as closely as possible
JavaScript
23
star
6

cheqlist

Desktop application for Remember The Milk (SHUT DOWN)
Java
20
star
7

gradle-cobertura-plugin

Gradle plugin for Cobertura
Groovy
19
star
8

kanban

Simple kanban board backed by MongoDB, jade, stylus and mocha
JavaScript
17
star
9

groovyrtm

Groovy API for Remember The Milk (DEPRECATED)
Groovy
13
star
10

brunch-jade-bootstrap-and-coffee

Brunch skeleton including Bootstrap, SASS, Jade and CoffeeScript
CoffeeScript
13
star
11

eriwen.com

Eric Wendelin's blog at eriwen.com
CSS
7
star
12

gradle-digest-plugin

Digest sources to allow identification of files by their content
Kotlin
7
star
13

hadoop-examples

Hadoop code examples for training purposes
Java
5
star
14

thumbs

Simple team-based rating application written in node.js
JavaScript
4
star
15

flot-plugins

Plugins for Flot, a Javascript charting library
JavaScript
4
star
16

brunch-notes-example

Simple notes app demonstrating features of Brunch
CoffeeScript
4
star
17

griffon-jython

Jython plugin for Griffon
Groovy
3
star
18

eriwen.com-v3

Relevant sourcecode for the old WordPress version of eriwen.com
JavaScript
3
star
19

kanban-coffee

Kanban board written in NodeJS, CoffeeScript, Jade, Stylus, and Mocha
CoffeeScript
3
star
20

dashpebble

Pebble watch face modeled after DashClock for Android
C
2
star
21

coffee-script-source-maps-ftw

Coffee Script Source Maps FTW!
Ruby
2
star
22

github-launch-bookmark

Access GitHub from a single search box supercharged with command line power.
1
star
23

gradle-summit-2017-demo

CSS
1
star
24

gradle-node-playground

Playing around with node stuff and Gradle
JavaScript
1
star
25

ml-flower-recognition

Identify flower species from photos using a neural network
HTML
1
star
26

udacity-mldevops-exercise3

Jupyter Notebook
1
star
27

eriwen

About Eric Wendelin
1
star