From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sdkd6-0003aY-K7 for qemu-devel@nongnu.org; Sun, 10 Jun 2012 12:04:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sdkd4-0007lQ-TL for qemu-devel@nongnu.org; Sun, 10 Jun 2012 12:04:40 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:32886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sdkd4-0007lC-Kj for qemu-devel@nongnu.org; Sun, 10 Jun 2012 12:04:38 -0400 Received: by werf3 with SMTP id f3so1847964wer.4 for ; Sun, 10 Jun 2012 09:04:36 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FD4C592.4080107@redhat.com> Date: Sun, 10 Jun 2012 18:04:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <017b2d0961daf25d156270f69962fa82ba5be00c.1339333471.git.blauwirbel@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org 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-coverage $LDFLAGS" > +elif test "$debug" = "no" ; then > CFLAGS="-O2 $CFLAGS" > fi Why does need to be mutually exclusive? > > + > # 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` > @@ -3033,6 +3045,8 @@ echo "OpenGL support $opengl" > echo "libiscsi support $libiscsi" > echo "build guest agent $guest_agent" > echo "coroutine backend $coroutine_backend" > +echo "gcov $gcov_tool" > +echo "gcov enabled $gcov" > > if test "$sdl_too_old" = "yes"; then > echo "-> Your SDL version is too old - please upgrade to have SDL support" > @@ -3441,6 +3455,9 @@ echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak > echo "EXESUF=$EXESUF" >> $config_host_mak > echo "LIBS_QGA+=$libs_qga" >> $config_host_mak > echo "POD2MAN=$POD2MAN" >> $config_host_mak > +if test "$gcov" = "yes" ; then > + echo "GCOV=$gcov_tool" >> $config_host_mak > +fi > > # generate list of library paths for linker script > > diff --git a/tests/Makefile b/tests/Makefile > index 2e754c3..d265daa 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -1,18 +1,42 @@ > export SRC_PATH > > check-unit-y = tests/check-qdict$(EXESUF) > +GCOV_FILES = $(SRC_PATH)/qdict.c Ouch, ugly. Why is it needed? Paolo