Coverage Analisys with FATE
Use a compiler supporting gcov annotations, such as gcc or clang
Libav has a builtin support for gcov
- Build with coverage annotation (using gcov). Libav has a builtin support for gcov
./configure --toolchain=gcov
Coverage reports with gcovr
gcovr is a python script leveraging gcov to provide human and machine readable reports, by default it provides a simple tabular output that is diff-friendly. The other outputs are xml and html.
- Run fate
make fate
- Generate a textual report
gcovr -b -r ${srcdir} --object-directory ${builddir}
Coverage reports with lcov
lcov is a set of perl programs leveraging gcov, the html output provided is similar to what gcovr provides but with more features.
- Reset the lcov coverage data
lcov -b . -d . --zerocounters
- Run fate
make fate
- Collect the coverage information
lcov -b . -d . -c --output-file coverage.info
- Generate an human readable report
genhtml -o lcov-output coverage.info
Since version 10 the shortcuts make lcov and make lcov-reset are available.