[riot-devel] Unit test code coverage using gcov

Kaspar Schleiser kaspar at schleiser.de
Tue Oct 9 16:52:35 CEST 2018

Hey Toon,

On 10/9/18 4:16 PM, STEGEN Toon wrote:
> Has anybody succeeded in getting gcov to work to check code coverage of
> the unit tests?

I managed to get gprof working at some point. AFAIR they're using the
same infrastructure (PC sampling, saving it somewhere, then dumping the
file) as gcov.

gcc's "-pg" needs library support. For that I have a branch [1].
It is quite old, but maybe it helps.

[1] https://github.com/kaspar030/RIOT/tree/add_gcov_support

More information about the devel mailing list