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
http://sourceforge.net/projects/bcov/
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:
http://git.gnome.org/browse/json-glib/commit/?id=5b4186eb60e953ddbaadcd53b1996d28b06d4a97

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 build.gnome.org.

Stefan

> As a side effect, the idea is encourage devels to:
>  - Use the new Glib and GTK+ test frameworks [3] and [4]
>  - Use build.gnome.org service. For example, take a look to Glib coverage [5]
> 
> All the info is available in the GnomeGoal/AddCodeCoverage page.
> 
> Comments / suggestions welcomed.
> 
> [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
> [2] http://live.gnome.org/GnomeGoals/AddCodeCoverage
> [3] http://library.gnome.org/devel/glib/stable/glib-Testing.html
> [4] http://library.gnome.org/devel/gtk/stable/gtk-Testing.html
> [5] http://fixed.gnome.org/coverage/glib/lcov/



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