[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: Mon, 26 Nov 2012 18:56:59 +0000 (GMT)

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
]]]

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'?
- Julian
Received on 2012-11-26 19:57:35 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.