[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: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Mon, 26 Nov 2012 23:15:13 +0100

On Mon, Nov 26, 2012 at 7:56 PM, Julian Foad <julianfoad_at_btopenworld.com>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.
> >
> > 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
>
>
> Some of the Python tests error out when I run them in parallel like this.
> The errors are:
> [[[
> W: profiling:/.../subversion/libsvn_subr/.libs/nls.gcda:Invocation
> mismatch - some data files may have been removed
> ]]]
>

Hm. It works for me (except for 1 test that fails from time to time).
I run that test script only as a quick check for major breakage.

> I found an email <http://gcc.gnu.org/ml/gcc-help/2005-11/msg00074.html>
> which says "gcov instrumentation is multi-process safe, but not
> multi-thread safe. The
> multi-processing safety relies on OS level file locking, which is not
> available
> on some systems.".
>
> >
> > lcov -d . -b . -c -o tests.lcov > lcov.log
> > genhtml tests.lcov -o html > genhtml.log
> > ]]]
>
>
> OK, that part works.
>
> Is there a command to reset the coverage statistics, that I can do before
> a test run if I don't want to 'make clean'?
>

Not sure 'make clean' would even help. This is what I do:

find . -name "*.gc*" -print0 | xargs -0 rm -rf

-- Stefan^2.

-- 
Certified & Supported Apache Subversion Downloads:
*
http://www.wandisco.com/subversion/download
*
Received on 2012-11-26 23:15:45 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.