gcovr - generate simple coverage reports
A utility to run gcov and generate a simple report that summarizes the coverage
- -h, --help
- show this help message and exit
- Print the version number, then exit
- -v, --verbose
- 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
- -o OUTPUT, --output=OUTPUT
- Print output to this filename
- -k, --keep
- Keep the temporary *.gcov files generated by gcov. By
default, these are deleted.
- -d, --delete
- Delete the coverage files after they are processed. These
are generated by the users's program, and by default gcovr does not remove
- -f FILTER, --filter=FILTER
- Keep only the data files that match this regular
- -e EXCLUDE, --exclude=EXCLUDE
- Exclude data files that match this regular expression
- Keep only gcov data files that match this regular
- Exclude gcov data files that match this regular
- -r ROOT, --root=ROOT
- Defines the root directory for source files. This is also
used to filter the files, and to standardize the output.
- -x, --xml
- Generate XML instead of the normal tabular output.
- Generate pretty XML instead of the normal dense
- 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
- -b, --branches
- Tabulate the branch coverage instead of the line
- -u, --sort-uncovered
- Sort entries by increasing number of uncovered lines.
- -p, --sort-percentage
- Sort entries by decreasing percentage of covered
- 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.
- Exclude directories from search path that match this
- -g, --use-gcov-files
- Use preprocessed gcov files for analysis.
- -s, --print-summary
- Prints a small report to stdout with line & branch
Copyright (2013) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain
rights in this software.
The full documentation for gcovr
is maintained as a Texinfo manual. If
programs are properly installed at your site,
- info gcovr
should give you access to the complete manual.