LinuxCommandLibrary

lcov

TLDR

Capture coverage data

$ lcov --capture --directory [.] --output-file [coverage.info]
copy
Generate HTML report
$ genhtml [coverage.info] --output-directory [coverage/]
copy
Remove patterns
$ lcov --remove [coverage.info] '*/test/*' -o [filtered.info]
copy
Extract specific files
$ lcov --extract [coverage.info] '*/src/*' -o [src.info]
copy
Combine traces
$ lcov --add-tracefile [a.info] --add-tracefile [b.info] -o [combined.info]
copy
Zero counters
$ lcov --zerocounters --directory [.]
copy

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.
lcov manages code coverage data.

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.

SEE ALSO

gcov(1), genhtml(1), gcovr(1)

> TERMINAL_GEAR

Curated for the Linux community

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99