Re: New propossed GnomeGoal: Add code coverage support
- From: Stefan Kost <ensonic hora-obscura de>
- To: Javier Jardón <javierjc1982 gmail com>
- Cc: desktop-devel-list <desktop-devel-list gnome org>
- Subject: Re: New propossed GnomeGoal: Add code coverage support
- Date: Sun, 10 Jan 2010 00:01:50 +0200
Am 04.01.2010 19:53, schrieb Javier Jardón:
> The objective of the GnomeGoal is to add code coverage of your code
> with GCOV 
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:  (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 build.gnome.org.
> As a side effect, the idea is encourage devels to:
> - Use the new Glib and GTK+ test frameworks  and 
> - Use build.gnome.org service. For example, take a look to Glib coverage 
> All the info is available in the GnomeGoal/AddCodeCoverage page.
> Comments / suggestions welcomed.
>  http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
>  http://live.gnome.org/GnomeGoals/AddCodeCoverage
>  http://library.gnome.org/devel/glib/stable/glib-Testing.html
>  http://library.gnome.org/devel/gtk/stable/gtk-Testing.html
>  http://fixed.gnome.org/coverage/glib/lcov/
] [Thread Prev