How linux-test-project/lcov works
LCOV turns coverage measurements from several tools into LCOV trace data, supports capture and manipulation, and produces browsable HTML or spreadsheet reports. Its principal workflow is measurement capture or format conversion, trace-data processing, then report generation; additional capabilities include differential coverage, description files, and image overviews. The README documents several central tools not present in the supplied tree listing, so those are represented at the documented bin directory level. C++ data-structure relationships are limited to those evidenced by the source index or excerpts.
Main entry points: genhtml HTML report generation · jacoco2lcov JaCoCo wrapper · xml2lcovutil.py XML converter · BranchData.hpp Branch data API
Components 22
Capture and conversion
- Capture and LCOV tools
bin - Perl converter
bin/perl2lcov - LLVM converter
bin/llvm2lcov - Python converter
bin/py2lcov - XML converter
bin/xml2lcovutil.py - JaCoCo wrapper
bin/jacoco2lcov
Trace processing
- LCOV trace data
- Differential extraction
bin/html2lcov
Reports and analysis
- HTML report generation
bin/genhtml - Report descriptions
bin/gendesc - Source PNG overviews
bin/genpng - Spreadsheet reports
scripts/spreadsheet.py
Coverage data layer
- Branch data
lib/LcovUtil/BranchData.cpp - Branch data API
lib/LcovUtil/BranchData.hpp - Function data
lib/LcovUtil/FunctionData.cpp - Function data API
lib/LcovUtil/FunctionData.hpp - MC/DC data
lib/LcovUtil/MCDCData.cpp - MC/DC data API
lib/LcovUtil/MCDCData.hpp - Count arithmetic
lib/LcovUtil/CountArith.hpp - Binary serialization
lib/LcovUtil/BinarySerializer.hpp
Other components
- Coverage user
- Coverage measurements
Connections 28
- Coverage user → Coverage measurements: runs tests
README.rst - Coverage measurements → Capture and LCOV tools: captures data
README.rst - Coverage measurements → Perl converter: converts data
README.rst - Coverage measurements → LLVM converter: converts data
README.rst - Coverage measurements → Python converter: converts data
README.rst - Coverage measurements → XML converter: converts data
README.rst - Coverage measurements → JaCoCo wrapper: converts data
README.rst - Capture and LCOV tools → LCOV trace data: creates data
README.rst - Perl converter → LCOV trace data: writes LCOV
README.rst - LLVM converter → LCOV trace data: writes LCOV
README.rst - Python converter → LCOV trace data: writes LCOV
README.rst - XML converter → LCOV trace data: writes LCOV
README.rst - JaCoCo wrapper → XML converter: invokes converter
README.rst - JaCoCo wrapper → LCOV trace data: applies LCOV options
README.rst - Coverage user → LCOV trace data: manipulates data
README.rst - LCOV trace data → HTML report generation: generates report
README.rst - LCOV trace data → Differential extraction: extracts diffs
README.rst - HTML report generation → Report descriptions: uses descriptions
- HTML report generation → Source PNG overviews: generates overviews
README.rst - LCOV trace data → Spreadsheet reports: feeds reports
- Coverage user → HTML report generation: views coverage
README.rst - Branch data → Branch data API: implements API
lib/LcovUtil/BranchData.cpp - Function data → Function data API: implements API
lib/LcovUtil/FunctionData.cpp - MC/DC data → MC/DC data API: implements API
lib/LcovUtil/MCDCData.cpp - Branch data API → Count arithmetic: uses arithmetic
lib/LcovUtil/BranchData.hpp - Function data API → Count arithmetic: uses arithmetic
lib/LcovUtil/FunctionData.hpp - MC/DC data API → Count arithmetic: uses arithmetic
lib/LcovUtil/MCDCData.hpp - MC/DC data → Branch data API: uses branch API
lib/LcovUtil/MCDCData.cpp