Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target

2012-06-10 Thread Paolo Bonzini
Il 10/06/2012 20:07, Blue Swirl ha scritto: > > > check-unit-y = tests/check-qdict$(EXESUF) > > > +GCOV_FILES = $(SRC_PATH)/qdict.c > > > > Ouch, ugly. Why is it needed? > > Gcov needs to know both the source file and the object. Probably it > can't get this information from the object or .gc{da

Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target

2012-06-10 Thread Blue Swirl
On Sun, Jun 10, 2012 at 4:08 PM, Andreas Färber wrote: > 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 Swir

Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target

2012-06-10 Thread Blue Swirl
On Sun, Jun 10, 2012 at 4:04 PM, Paolo Bonzini wrote: > Il 10/06/2012 15:04, Blue Swirl ha scritto: >> @@ -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 -

Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target

2012-06-10 Thread Andreas Färber
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 > --- > configure | 19 ++- > tests

Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target

2012-06-10 Thread Paolo Bonzini
Il 10/06/2012 15:04, Blue Swirl ha scritto: > @@ -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

[Qemu-devel] [PATCH 2/2] tests: add gcov target

2012-06-10 Thread 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 --- configure | 19 ++- tests/Makefile | 40