golharam / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options

Home Page:http://simonkagstrom.github.com/kcov/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status

kcov

What is it?

Kcov is a code coverage tester for compiled languages, Python and Bash. Kcov was originally a fork of Bcov, but has since evolved to support a large feature set in addition to that of Bcov.

Kcov, like Bcov, uses DWARF debugging information for compiled programs to make it possible to collect coverage information without special compiler switches.

How to use it

Basic usage is straight-forward:

kcov /path/to/outdir executable [args for the executable]

/path/to/outdir will contain lcov-style HTML output generated continuously while the application runs. Kcov will also write cobertura- compatible XML output and can upload coverage data directly to http://coveralls.io for easy integration with travis-ci.

Filtering output

It's often useful to filter output, since e.g., /usr/include is seldom of interest. This can be done in two ways:

kcov --exclude-pattern=/usr/include --include-pattern=part/of/path,other/path \
      /path/to/outdir executable

which will do a string-comparison and include everything which contains part/of/path or other/path but exclude everything that has the /usr/include string in it.

kcov --include-path=/my/src/path /path/to/outdir executable
kcov --exclude-path=/usr/include /path/to/outdir executable

Does the same thing, but with proper path lookups.

Travis-ci / coveralls integration

kcov coverage collection is easy to integrate with travis-ci and coveralls.io. To upload data from the travis build to coveralls, run kcov with

kcov --coveralls-id=$TRAVIS_JOB_ID /path/to/outdir executable

which in addition to regular coverage collection uploads to coveralls.

More information

kcov is written by Simon Kagstrom simon.kagstrom@gmail.com and more information can be found at the web page

About

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options

http://simonkagstrom.github.com/kcov/index.html

License:GNU General Public License v2.0


Languages

Language:C++ 52.8%Language:JavaScript 19.9%Language:Python 10.9%Language:C 6.0%Language:CMake 5.5%Language:CSS 1.9%Language:HTML 1.4%Language:Shell 0.9%Language:Makefile 0.8%Language:Assembly 0.0%