qemu-devel
[Top][All Lists]
Advanced

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

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


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 2/2] tests: add gcov target
Date: Sun, 10 Jun 2012 18:08:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]