Summarizing gcov Coverage Statistics with gcovr
The gcovr command provides a utility for running the gcov command and summarizing code coverage results. This command is inspired by the Python coverage.py package, which provides a similar utility in Python. Further, gcovr can be viewed as a command-line alternative of the lcov utility, which runs gcov and generates an HTML output.
The gcovr command currently generates two different types of output:
See the gcovr Trac page for further details about this tool. The gcovr command is currently bundled with the FAST Python package, which you can download from the FAST Trac site. However, gcovr is a stand-alone Python script. Thus, it is also convenient to download the latest development version here.
The gcovr command currently generates two different types of output:
- Text Summary
For each file that generates gcov statistics, gcovr will summarize the number of lines covered, the percentage of coverage and enumerate the lines that are not covered. - Cobertura XML
An XML summary of the coverage statistics can be generated in a format that is consistent with Cobertura.
See the gcovr Trac page for further details about this tool. The gcovr command is currently bundled with the FAST Python package, which you can download from the FAST Trac site. However, gcovr is a stand-alone Python script. Thus, it is also convenient to download the latest development version here.
Great tip, thanks a lot!
ReplyDelete