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

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Jul 13 19:11:30 PDT 2013


On Fri, Mar 29, 2013 at 03:46:33PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
> On Fri, Mar 29, 2013 at 03:37:13PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
> > On Thu, Mar 28, 2013 at 02:54:06PM +0100, Thomas H.P. Andersen wrote:
> > > 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.
Applied, with some very ugly hacks to make vpath builds
semi-supported: coverage is generated correctly, but some paths are
displayed in full, so the output is not as pretty. Neverthless, it is
still useful for testing, so I left those "fixes" in.

Zbyszek


More information about the systemd-devel mailing list