Differences between revisions 7 and 8
Revision 7 as of 2013-10-28 15:43:47
Size: 772
Editor: lu_zero
Comment: Thanks to Peter for pointing the missing option
Revision 8 as of 2013-10-28 17:36:05
Size: 1157
Editor: lu_zero
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
== Coverage Analisys with lcov and FATE == == Coverage Analisys with FATE ==
{{{#!wiki alert alert-success
Use a compiler supporting gcov annotations, such as '''gcc''' or '''clang'''
}}}
Line 4: Line 7:
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 ===
Line 5: Line 15:
You need to install [[http://ltp.sourceforge.net/coverage/lcov.php|lcov]] and use a compiler supporting
gcov annotations, such as '''gcc''' or '''clang'''
Install [[http://gcovr.com|gcovr]].
}}}

 * Generate a textual report
{{{
gcovr -b -r ${srcdir} --object-directory ${builddir}
}}}

=== Coverage reports with lcov ===
{{{#!wiki alert alert-success
Install [[http://ltp.sourceforge.net/coverage/lcov.php|lcov]].
Line 15: Line 34:
 lcov -b . --directory . --zerocounters  lcov -b . -d . --zerocounters
Line 23: Line 42:
 lcov --directory . --capture --output-file coverage.info  lcov -b . -d . -c --output-file coverage.info
Line 27: Line 46:
 mkdir lcov-output

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

Install gcovr.

  • Generate a textual report

gcovr -b -r ${srcdir} --object-directory ${builddir}

Coverage reports with lcov

Install lcov.

  • Build with coverage annotation (using gcov). Libav has a builtin support for gcov
     ./configure --toolchain=gcov
  • 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


CategoryHowTo