lcov
processes gcov code coverage data
TLDR
Capture coverage data
$ lcov --capture --directory [.] --output-file [coverage.info]
Generate HTML report$ genhtml [coverage.info] --output-directory [coverage/]
Remove patterns$ lcov --remove [coverage.info] '*/test/*' -o [filtered.info]
Extract specific files$ lcov --extract [coverage.info] '*/src/*' -o [src.info]
Combine traces$ lcov --add-tracefile [a.info] --add-tracefile [b.info] -o [combined.info]
Zero counters$ lcov --zerocounters --directory [.]
SYNOPSIS
lcov [options]
DESCRIPTION
lcov processes gcov code coverage data. It collects and manipulates coverage information.
The tool generates coverage reports from gcc/gcov data. Use genhtml to create HTML reports.
PARAMETERS
--capture
Capture coverage data.--directory DIR
Source directory.--output-file FILE
Output trace file.--remove FILE PATTERN
Remove matching files.--extract FILE PATTERN
Extract matching files.--add-tracefile FILE
Add trace file.--help
Display help information.
CAVEATS
Requires gcc/gcov. C/C++ focused. Part of LCOV package.
HISTORY
lcov was created for the Linux Test Project to provide graphical code coverage analysis.

