Am 10.06.2012 15:04, schrieb Blue Swirl: > Add support for compiling for GCOV test coverage, enabled > with '--enable-gcov' during configure. > > After tests, test coverage can be reported with 'make gcov'. > > Signed-off-by: Blue Swirl <blauwir...@gmail.com> > --- > configure | 19 ++++++++++++++++++- > tests/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 58 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index b4fb715..d773f4e 100755 > --- a/configure > +++ b/configure [...] > @@ -2851,10 +2859,14 @@ fi > # End of CC checks > # After here, no more $cc or $ld runs > > -if test "$debug" = "no" ; then > +if test "$gcov" = "yes" ; then > + CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" > + LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" > +elif test "$debug" = "no" ; then > CFLAGS="-O2 $CFLAGS" > fi
Is it intentional that no -O option is being specified for gcov? > > + > # Consult white-list to determine whether to enable werror > # by default. Only enable by default for git builds > z_version=`cut -f3 -d. $source_path/VERSION` [snip] Am I understanding correctly that this gcov setup must be done in a separate build dir from an actually "usable" build? Small improvement: Please either include a cover letter for a threaded series or send unrelated patches separately. Groups replies more nicely. Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg