LCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement.
HTML output of a small example project.
![]() |
![]() |
|
| Screenshot 1: Overview page | Screenshot 2: Annotated source code |
Note: source code and Makefile for this example are part of the .tar.gz file (see download section).
Latest release: LCOV 1.12 (changelog).
Source code: LCOV is released under the GPL license.
git clone https://github.com/linux-test-project/lcov.git
Instructions on how to quickly get started with lcov:
--coverage to compiler and linker flags (for example CFLAGS and LDFLAGS)lcov --capture --directory project-dir --output-file coverage.info
genhtml coverage.info --output-directory out
Please see the Contribution guidelines for instructions on how to contribute to LCOV.
For comments and questions contact: ltp-coverage@lists.sourceforge.net