Re: New propossed GnomeGoal: Add code coverage support

Am 04.01.2010 19:53, schrieb Javier Jardón:
> Hello,
> The objective of the GnomeGoal is to add code coverage of your code
> with GCOV [1]

Good goal! I wonder how many of the gnome projects even have a test suite, which
is the prerequisite :)

GCov has the drawback that one needs to rebuild the package with coverage flags
enabled. Just a few days ago I found
which does not needs that. I also produces (almost) same results reports like
lcov. I has some missing feature and drawback though. I plan to have a look at
some of the shortcommings.

> You can take a look to the GnomeGoal page here: [2] (There are also
> examples to add GCOV support to json-glib and libgdata)

Also in the lgo page you gave this commit as an example:

I don't think it is a good one. In the configure check it does:
+       GCOV_CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+       GCOV_LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"

which should be

+       GCOV_CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
+       GCOV_LDFLAG="$LDFLAGS -lgcov"

Ideally we agree on a name for the target and for the configure flag. Especialy
the configure flag is needed so that it works in


> As a side effect, the idea is encourage devels to:
>  - Use the new Glib and GTK+ test frameworks [3] and [4]
>  - Use service. For example, take a look to Glib coverage [5]
> All the info is available in the GnomeGoal/AddCodeCoverage page.
> Comments / suggestions welcomed.
> [1]
> [2]
> [3]
> [4]
> [5]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]