Differences between revisions 12 and 13
Revision 12 as of 2013-10-28 18:09:31
Size: 1602
Editor: lu_zero
Revision 13 as of 2013-10-28 18:10:04
Size: 1429
Editor: lu_zero
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
{{{#!wiki alert alert-success
Install [[http://gcovr.com|gcovr]].
Line 31: Line 28:
{{{#!wiki alert alert-success
Install [[http://ltp.sourceforge.net/coverage/lcov.php|lcov]].

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 C++ 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.