[systemd-devel] [PATCH] Add test coverage and generate report with lcov

Thomas H.P. Andersen phomes at gmail.com
Thu Mar 28 06:54:06 PDT 2013


On Wed, Feb 13, 2013 at 4:16 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Tue, 05.02.13 23:56, Thomas H.P. Andersen (phomes at gmail.com) wrote:
>
>> Adds test coverage and generates html reports. Configure with
>> --enable-coverage and run make lcov.
>>
>> make lcov-upload exists but it currently just rsyncs the report to
>> ~/coverage. Perhaps we can set up a host for it and automate it later?
>
> We could probably upload that to fdo...
>
>> I have temporarily uploaded an example to look at here:
>> http://people.gnome.org/~thomashpa/coverage/
>
> Neat!
>
>> Assuming that this is only useful for the core developers/buildbots I
>> have not cluttered the code with workarounds for old versions for
>> libtool, checks for non-gcc compilers, etc. I can add it you find it
>> worth the extra lines in configure (or split it out to a m4 like
>> gstreamer).
>>
>> Note that this requires lcov 1.10. (rawhide is still at 1.9). The
>> older versions have bugs that we hit with systemd. 1.10 also has the
>> --no-external option that avoids including things from /usr in the
>> report.
>
> Hmm, given that this isn't even in rawhide, it might make sense to at
> least check for lcov version in autoconf, as only test?

I forgot about this. lcov 1.10 is now in rawhide, but here is an
updated patch with the version check anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-test-coverage-and-generate-report.patch
Type: application/octet-stream
Size: 4332 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130328/8365648d/attachment-0001.obj>


More information about the systemd-devel mailing list