You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Fuhrmann <st...@wandisco.com> on 2012/12/03 13:08:27 UTC

Re: Test code coverage

On Thu, Nov 29, 2012 at 12:14 AM, Julian Foad <ju...@btopenworld.com>wrote:

> Hyrum K Wright wrote:
>
> > On Sun, Nov 25, 2012 at 5:17 PM, Stefan Fuhrmann wrote:
> >> I was wondering whether we could have one or two of
> >> our UNIX build bots create a code coverage profile
> >> and make the results available online.
> >>
> >> Here is what I use in my test runner script:
> >>
> >> [[[
> >> env CFLAGS='-fprofile-arcs -ftest-coverage' ./configure
> --disable-shared --enable-maintainer-mode $moreopts
> >>
> >> make -sj 2> /dev/null > /dev/null
> >> make svnserveautocheck PARALLEL=1
> >>
> >> lcov -d . -b . -c -o tests.lcov > lcov.log
> >> genhtml tests.lcov -o html > genhtml.log
> >> ]]]
> >
> >
> > +1 to test coverage stats.
> >
> >
> > We have an ancient patch [...] in tools/dev/gcov.patch. [...]
>
> I attach an updated patch.  It uses 'lcov' instead of 'gcov' as Stefan
> suggests, which makes the Makefile target much simpler; and I modeled the
> 'configure' handling on the existing --enable-gprof switch.
>

Looks good.


> The existing --enable-gprof option requires --disable-shared and
> recommends --enable-all-static, and I have just copied that without
> understanding why or whether the same applies to gcov.
>

Given the bindings problem you ran into with an all-static build,
I wonder whether it should rather be the other way around.

I'll probably commit it soon if there are no objections, even though my
> testing has been rather limited, as it seems unlikely to cause problems for
> anyone except those who use it.
>

Since this is a developers only option, it is sufficient if we
know about at least one working configuration.

-- Stefan^2.

-- 
Certified & Supported Apache Subversion Downloads:
*

http://www.wandisco.com/subversion/download
*

Re: Test code coverage

Posted by Julian Foad <ju...@btopenworld.com>.
Stefan Fuhrmann wrote:
> Julian Foad wrote:
>> Hyrum K Wright wrote:
>>> Stefan Fuhrmann wrote:
>>>> I was wondering whether we could have one or two of
>>>> our UNIX build bots create a code coverage profile
>>>> and make the results available online.
[...]
>> I attach an updated patch.  It uses 'lcov' instead of 'gcov'
>> as Stefan suggests, which makes the Makefile target much
>> simpler; and I modeled the 'configure' handling on the
>> existing --enable-gprof switch.
> 
> Looks good.
>  
>> The existing --enable-gprof option requires --disable-shared
>> and recommends --enable-all-static, and I have just copied that
>> without understanding why or whether the same applies to gcov.
> 
> Given the bindings problem you ran into with an all-static build,
> I wonder whether it should rather be the other way around.

I have left it as it is, since

configure --enable-gcov --disable-shared --without-gnome-keyring

works for me if I avoid swig-py and swig rb bindings.

(With --enable-all-static Subversion doesn't build for me, but judging by the error messages that's probably because I don't have static versions of the dependencies installed.)

>> I'll probably commit it soon if there are no objections, even
>> though my testing has been rather limited, as it seems unlikely
>> to cause problems for anyone except those who use it.
> 
> Since this is a developers only option, it is sufficient if we
> know about at least one working configuration.

True.  Committed in r1416646.

- Julian