Rust tool to collect and aggregate code coverage data for multiple source files
Перейти к файлу
Marco Castelluccio 4b9a7e47e1 Bump version to 0.1.4 2017-03-17 01:50:26 +01:00
src Remove proc_macro feature. 2017-03-16 17:47:02 +00:00
test Support passing ZIP files as inputs, instead of directories 2017-03-13 19:39:33 +01:00
tests Don't consider the /usr/include records for the final count 2017-03-10 17:24:03 +01:00
.gitignore First commit 2017-02-25 13:21:40 +00:00
.travis.yml Test both stable and nightly 2017-03-16 19:41:30 +01:00
Cargo.lock Bump version to 0.1.4 2017-03-17 01:50:26 +01:00
Cargo.toml Bump version to 0.1.4 2017-03-17 01:50:26 +01:00
README.md Fix markdown in README.md 2017-03-07 17:42:37 +01: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.