Differences between revisions 11 and 12
Revision 11 as of 2013-10-28 17:37:53
Size: 1064
Editor: lu_zero
Comment:
Revision 12 as of 2013-10-28 18:09:31
Size: 1602
Editor: lu_zero
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
[[http://gcovr.com|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.
Line 27: Line 29:
[[http://ltp.sourceforge.net/coverage/lcov.php|lcov]] is a set of C++ programs leveraging ''gcov'', the html output provided is similar to what ''gcovr'' provides but with more features.
Line 30: Line 34:
Line 47: Line 50:

{{{#!wiki alert alert-info
Since version 10 the shortcuts '''make lcov''' and '''make lcov-reset''' are available.
}}}

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.

Install gcovr.

  • 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.

Install lcov.

  • 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.


CategoryHowTo