[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Test code coverage

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 28 Nov 2012 23:14:07 +0000 (GMT)

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. 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. 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. - Julian

Received on 2012-11-29 00:14:43 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.