Scroll to navigation

GCOVR(1) User Commands GCOVR(1)

NAME

gcovr - generate simple coverage reports

SYNOPSIS

gcovr [options]

DESCRIPTION

A utility to run gcov and generate a simple report that summarizes the coverage

OPTIONS

show this help message and exit
Print the version number, then exit
Print progress messages
Specify the directory that contains the gcov data files. gcovr must be able to identify the path between the *.gcda files and the directory where gcc was originally run. Normally, gcovr can guess correctly. This option overrides gcovr's normal path detection and can specify either the path from gcc to the gcda file (i.e. what was passed to gcc's '-o' option), or the path from the gcda file to gcc's original working directory.
Print output to this filename
Keep the temporary *.gcov files generated by gcov. By default, these are deleted.
Delete the coverage files after they are processed. These are generated by the users's program, and by default gcovr does not remove these files.
Keep only the data files that match this regular expression
Exclude data files that match this regular expression
Keep only gcov data files that match this regular expression
Exclude gcov data files that match this regular expression
Defines the root directory for source files. This is also used to filter the files, and to standardize the output.
Generate XML instead of the normal tabular output.
Generate pretty XML instead of the normal dense format.
Generate HTML instead of the normal tabular output.
Generate HTML output for source file coverage.
Set the paths in the HTML report to be absolute instead of relative
Tabulate the branch coverage instead of the line coverage.
Sort entries by increasing number of uncovered lines.
Sort entries by decreasing percentage of covered lines.
Defines the name/path to the gcov executable [defaults to the GCOV environment variable, if present; else 'gcov'].
Exclude from coverage branches which are marked to be excluded by LCOV/GCOV markers or are determined to be from lines containing only compiler-generated "dead" code.
Use preprocessed gcov files for analysis.
Prints a small report to stdout with line & branch percentage coverage
April 2024 gcovr 7.2