Code Monkey home page Code Monkey logo

grcov's Introduction

grcov

Build Status 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

Build & Test

cargo build
# By default, the binary is generated in ./target/debug/grcov

To test the binary:

cargo test

Minimum requirements

  • GCC 4.9 or higher is required.

grcov's People

Contributors

marco-c avatar jgraham avatar sush0512 avatar sylvestre avatar vsham20 avatar

Watchers

Ben 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.