FFmpeg: FATE lines of code coverage (LCOV)

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 371
Joined: Tue Nov 12, 2013 2:05 am

FFmpeg: FATE lines of code coverage (LCOV)

Post by peter_b »

I'm going to describe the necessary steps to produce an HTML output of code coverage by FFmpeg's FATE tests, just like the one on http://coverage.ffmpeg.org/ :)
It's basically a different version of the article "FATE/TestingCoverage" on FFmpeg wiki.

The OS used is Ubuntu 12.04 (LTS).
Most of these instructions should work for other versions of Ubuntu, as well as Debian too.


Install LCOV package:

Code: Select all

$ apt-get install lcov
Compile/build FFmpeg with GCOV support:
Configure your FFmpeg build as usual, but add the following build option:

Code: Select all

--toolchain=gcov
In case you've got the fate-suite samples in a non-default location, now would be the right time to add "--samples=path-to-fate-suite/".

Then compile/build FFmpeg:

Code: Select all

$ make clean && make
Run FATE tests:

Code: Select all

# The -j parameter controls thread number for parallel building
$ make -k -j6 fate
Even though with these parameters tests run in parallel, his can take a while... ;)

Generate LCOV HTML output:

Code: Select all

$ make lcov
View HTML page:
Open the file "index.html" in the folder "lcov" in FFmpeg's source tree.

:D

Links:
Post Reply