Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] gcov results aggregation


----- Original Message -----
> From: "Mr. Clif" <clif@xxxxxxxxxxxxx>
> To: "Linux Tools developer discussions" <linuxtools-dev@xxxxxxxxxxx>
> Sent: Friday, March 21, 2014 8:03:39 PM
> Subject: Re: [linuxtools-dev] gcov results aggregation
> 
> So now that I've familiarized myself with lcov and genhtml, I see they
> do exactly what I was trying to describe below. ;-) I'm wondering if
> anyone knows of a way to combine the output of several lcov style
> tracefiles together to be viewed in the eclipse profile window?

I see that lcov has a way to combine tracefiles :
https://wiki.documentfoundation.org/Development/Lcov#Combine_lcov_tracefiles

I don't think we currently support lcov tracefiles (assuming they're
different from the gcno/gcda format) but I suppose this could be a feature
request to combine the original gcno/gcda files and display that for users.


> On 03/19/2014 02:33 PM, Mr. Clif wrote:
> > Hello,
> >
> > I've been playing with unit testing (using Google test) and gcov lately.
> > Like many others I have a little routine that uses ifdef macros to
> > compile in different features some of which are mutually exclusive.
> > This means that for the unit tests I have several object directories,
> > one for each combination of features that I think are important to
> > test together. Though since it's all the same program I felt the need
> > to find a way to aggregate the unit test results into one continuous
> > output stream from all these different binaries (generated from the
> > same source file) that I'm running. So I wrote a little script to pass
> > the results up to the eclipse unit test plugin and that all works just
> > fine.
> >
> > Now I want to do something simular for checking the code coverage of
> > all my unit tests. I suppose the usual way would be to run one unit
> > test at a time and look at the coverage output, but as above, I would
> > like eclipse to aggregate it all together to save me time, and the
> > possibility of accidentally missing something. If the profile feature
> > accually used the gcov binary output then I could merge all of the
> > execution counts from the resulting .gcov file together for the same
> > source file, which is what I would like. However it seems (as I've
> > read elsewhere) that gcov is not called and you parse the .gcno and
> > .gcda files yourselves.
> >
> > So I'm wondering what the conventional best practice is here, or if
> > there is a provision for test data aggregation in eclipse.


It should be possible to do this as I'm pretty sure our Gcov plugin
already aggregates the results per execution. I know we've wanted to
allow users to choose between whether gcov aggregates or generates
new record files each time so perhaps we could add a feature for this. 


Cheers,
-- 
Roland Grunberg


Back to the top