Giter Club home page Giter Club logo

oreo639 / kcov Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonkagstrom/kcov

0.0 0.0 0.0 2.33 MB

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

License: GNU General Public License v2.0

Shell 0.95% JavaScript 15.38% C++ 57.84% Python 10.78% C 4.99% Assembly 0.01% CSS 1.44% Makefile 0.84% HTML 1.05% CMake 6.58% Dockerfile 0.13%

kcov's Introduction

Coveralls coverage status Codecov coverage status Coverity Scan Build Status Docker Pulls

PayPal Donate Github All Releases

kcov

Kcov is a FreeBSD/Linux/OSX 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.

For a video introduction, look at this presentation from SwedenCPP

Installing

Refer to the INSTALL file for build instructions, or use our official Docker images:

Note:

Tags v31-v33 are re-tags of ragnaroek/kcov which were not automated builds.

Tags v34-v35 are non automated builds using the Dockerfile in master with 1 minor modification.

Tag v36 is a non automated build using the Dockerfile in master.

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. A generic coverage.json report is also generated which contains summaries for a given binary and each source file.

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.

Merging multiple kcov runs

Kcov can also merge the results of multiple earlier runs. To use this mode, call kcov with --merge, an output path and one or more paths to an earlier run, e.g.,

kcov --merge /tmp/merged-output /tmp/kcov-output1 /tmp/kcov-output2
kcov --merge /tmp/merged-output /tmp/kcov-output*    # With a wildcard

Use from continuous integration systems

kcov is easy to integrate with travis-ci together with coveralls.io or codecov.io. It can also be used from Jenkins, SonarQube and GitLab CI. Refer to

  • coveralls for details about travis-ci + coveralls, or
  • codecov for details about travis-ci + codecov
  • jenkins for details about how to integrate in Jenkins
  • sonarqube for how to use kcov and sonarqube together
  • gitlab for use with GitLab

Full-system instrumentation

Kcov can instrument all binaries with very low overhead for embedded systems. Refer to the full system instrumentation documentation for details.

More information

kcov is written by Simon Kagstrom [email protected] and more information can be found at the web page

kcov's People

Contributors

aghecenco avatar asomers avatar austin987 avatar botellaa avatar brycefisher avatar cattanimarco avatar davidtazy avatar dbanetto avatar dciabrin avatar dridi avatar garik avatar jameswarner avatar ko1nksm avatar l3laze avatar lifthrasiir avatar malept avatar mbland avatar meqif avatar mmlb avatar nate-thirdwave avatar neumannt avatar orycterope avatar pauldreik avatar philwhineray avatar pietro avatar richardwhiuk avatar rpoyner-tri avatar simonkagstrom avatar vincentgibert avatar vlajos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.