Rust tool to collect and aggregate code coverage data for multiple source files
Перейти к файлу
Marco Castelluccio 631b320b42 Don't ignore gcno files that are not associated with any gcda file.
Fixes #42
2017-10-18 19:25:13 +01:00
src Don't ignore gcno files that are not associated with any gcda file. 2017-10-18 19:25:13 +01:00
test Don't ignore gcno files that are not associated with any gcda file. 2017-10-18 19:25:13 +01:00
tests Fix some issues suggested by clippy 2017-09-20 15:47:52 +02:00
.gitignore First commit 2017-02-25 13:21:40 +00:00
.travis.yml Change symlinks directory name 2017-04-26 23:23:51 +02:00
Cargo.lock Version 0.1.25 2017-07-13 18:03:49 +02:00
Cargo.toml Version 0.1.25 2017-07-13 18:03:49 +02:00
README.md Fix README 2017-04-03 10:50:15 -07:00
install.sh Add a parameter in install.sh to move grcov to a specified directory. Fixes #10 2017-03-10 14:43:21 +01:00

README.md

grcov

Build Status

grcov collects and aggregates code coverage information for multiple source files.

Usage

  1. Download grcov from https://github.com/marco-c/grcov/releases.
  2. Run grcov:
Usage: grcov DIRECTORY[...] [-t OUTPUT_TYPE] [-s SOURCE_ROOT] [--token COVERALLS_REPO_TOKEN]
You can specify one or more directories, separated by a space.
OUTPUT_TYPE can be one of:
 - (DEFAULT) ade for the ActiveData-ETL specific format;
 - lcov for the lcov INFO format;
 - coveralls for the Coveralls specific format.
SOURCE_ROOT is the root directory of the source files, required for the 'coveralls' format.
REPO_TOKEN is the repository token from Coveralls, required for the 'coveralls' format.

Let's see a few examples, assuming the source directory is ~/Documenti/mozilla-central and the build directory is ~/Documenti/mozilla-central/build.

LCOV output

grcov ~/Documenti/mozilla-central/build -t lcov > lcov.info

As the LCOV output is compatible with lcov, genhtml can be used to generate a HTML summary of the code coverage:

genhtml -o report/ --show-details --highlight --ignore-errors source --legend lcov.info

Coveralls output

grcov ~/Documenti/FD/mozilla-central/build -t coveralls -s ~/Documenti/FD/mozilla-central --token YOUR_COVERALLS_TOKEN > coveralls.json

Minimum requirements

  • GCC 4.9 or higher is required.