EnglishFrenchSpanish

OnWorks favicon

kcov - Online in the Cloud

Run kcov in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command kcov that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


kcov - Code coverage analysis for compiled programs and Python scripts

SYNOPSIS


kcov [options] outdir executable [ args for executable ]

DESCRIPTION


This manual page documents briefly the kcov command. kcov is a code coverage tester for
ELF binaries, Python scripts and shell scripts. It allows collecting code coverage
information from executables without special compiler directives, and continuously
produces output from long-running applications.

OPTIONS


-p, --pid=PID
Trace PID instead of executing executable, executable is optional in this case.

-l, --limits=low,high
Setup limits for low/high coverage (default: 16,50).

--include-path=P1[,P2...]
Comma-separated list of paths to include in the report.

--exclude-path=P1[,P2...]
Comma-separated list of paths to exclude from the report.

--include-pattern=P1[,P2...]
Comma-separated list of path patterns to include in the report.

--exclude-pattern=P1[,P2...]
Comma-separated list of path patterns to exclude from the report.

--collect-only
Only collect coverage data, don't produce HTML/Cobertura output

--report-only
Only report HTML/Cobertura output, don't collect data

--coveralls-id=id
Upload data to coveralls.io using secret repo_token or Travis CI service job ID id.
The ID is taken as a repo_token if it's longer or equal to 32 characters.

UNCOMMON OPTIONS


--path-strip-level=N
Number of path levels to show for common paths (default: 2).

--skip-solibs
Skip coverage collection for shared libraries (improves performance)

--exit-first-process
exit when the first process exits, i.e., honor the behavior of daemons. The default
behavior is to return to the console when the last process exits.

--python-parser=PARSER
Set the python parser to use for Python programs (the default is python). Can be
used to run with Python 3 on systems where Python 2 is the default.

--bash-parser=PARSER
Set the bash parser to use for shell scripts (the default is /bin/bash).

--replace-src-path=P1:P2
Replace source file path P1 with P2, if found.

EXAMPLES


Check coverage for ./frodo and generate HTML output in /tmp/kcov and cobertura output in
/tmp/kcov/frodo/cobertura.xml

kcov /tmp/kcov ./frodo

Check coverage for ./frodo but only include source files names with the string src/frodo

kcov --include-pattern=src/frodo /tmp/kcov ./frodo

Same as above but split collecting and reporting (perhaps on two different computers)

kcov --collect-only /tmp/kcov ./frodo

kcov --report-only --include-pattern=src/frodo /tmp/kcov ./frodo

HTML OUTPUT


The HTML output shows executed and non-executed lines of the source code. Some lines can
map to multiple instrumentation points, for example for inlined functions (where every
inlining of them will generate a separate instrumentation point). This is shown in the
left column as 1/3 for example, which means that one of the three instrumentation points
has been executed.

A special output link is [merged], which shows the union of all covered programs. This
can be useful for example when you have unit tests in multiple binaries which share a
subset of source files.

COBERTURA OUTPUT


Kcov also outputs data in the Cobertura XML format, which allows integrating kcov output
in Jenkins (see http://cobertura.sf.net and http://jenkins-ci.org).

The Cobertura output is placed in a file named out-path/exec-filename/cobertura.xml.

Use kcov online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Clementine
    Clementine
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 2
    XISMuS
    XISMuS
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    i...
    Download XISMuS
  • 3
    facetracknoir
    facetracknoir
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 4
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 5
    Freeciv
    Freeciv
    Freeciv is a free turn-based
    multiplayer strategy game, in which each
    player becomes the leader of a
    civilization, fighting to obtain the
    ultimate goal: to bec...
    Download Freeciv
  • 6
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands

Ad