drcov2lcov

Crates.iodrcov2lcov
lib.rsdrcov2lcov
version0.2.1
sourcesrc
created_at2023-09-14 12:21:22.064066
updated_at2024-08-07 19:56:46.373014
descriptionGenerate line coverage from drcov files
homepage
repositoryhttps://github.com/GeorgeLS/drcov2lcov
max_upload_size
id972575
size63,150
George Liontos (GeorgeLS)

documentation

README

drcov2lcov

drcov2lcov is an implementation of DynamoRIO's drcov2lcov in Rust.

Currently supported features:

Feature DynamoRIO's flag
Specify a single input file using -i or --input option -input
Specify a directory from which all drcov.*.log files will be processed -dir
Specify a file which contains a list of drcov files to process -list
Specify an output file to store line coverage information. Default: <current_directory>/coverage.info -output
Filter specific modules from the drcov file. This allows generating line coverage for only the modules matching the given regular expression. Default: None -mod_filter
Filter out specific modules from line coverage collection -mod_skip_filter
Filter specific source code paths from each module for line coverage collection -src_filter
Filter out specific source code paths from each module for line coverage collection -src_skip_filter
Replace a module path with another one before gathering debug info for that module -pathmap
Reduce the set of drov files from the input to a smaller set of drcov files containing the same coverage information -reduce_set

Unsupported features:

Feature DynamoRIO's flag
Specify a test function regular expression in order to generate test coverage information in the output file -test_pattern

Extra features vs DynamoRIO's drcov2lcov

This implementation of drcov2lcov supports generating line coverage for executables/libraries that have been compiled with Dwarf v5 symbols (this is the default for latest compilers)
as well as for executables/libraries that have been compiled with compressed Dwarf data.
Also, all filter arguments can accept multiple filters instead of a single one in the case of DynamoRIO's implementation.

Usage

In order to generate line coverage from a drcov file you can just run

drcov2lcov --input <input_file>

This will generate a coverage.info to the current working directory containing the line coverage.
If you want to save the line coverage to a different path/name you can run

drcov2lcov --input <input_file> --output <output_file>

Installing

You can either clone this repository and run

cargo build --release

if you want to build this project from source or install directly from crates.io by running

cargo install drcov2lcov
Commit count: 7

cargo fmt