Bug 38840 - Adding coverage analysis to unit tests
Stephan Bergmann
sbergman at redhat.com
Fri Aug 24 08:28:53 PDT 2012
On 08/19/2012 09:14 PM, John Smith wrote:
> - First you run a plain make in the top level directory to build LO
> (with analysis stuff enabled).
> - then you create a 'baseline' with lcov (sort of create a 'before
> snapshot' of LO)
> - *then* you run all your tests (whatever they may be)
> - then you re-run lcov to create an 'after snapshot'
> - then you compare the 'before' and 'after' snapshots, and you can
> tell what code was actually executed and therefore tested by your
> tests.
Call me dumb, but what I don't understand is why you want to have the
difference between the before and after snapshots, rather than the plain
after snapshot.
Do you want to filter out any code that is executed "by accident" (as it
belongs to tools we build and already execute at build time, say) rather
than by dedicated tests?
In a sense, even during the tests, very much of our code is executed "by
accident" rather than due to dedicated test code calling it: Especially
the subsequentcheck stuff contains checks that are not simple unit
tests, but start of a complete soffice.bin process, causing "unintended"
testing of large parts of the infrastructure code anyway.
Stephan
More information about the LibreOffice
mailing list