[Qemu-devel] [PATCH v2 6/7] Makefile: explicitly pass $(SRC_PATH) to gcovr

Alex Bennée posted 7 patches 6 years, 11 months ago
Maintainers: David Gibson <david@gibson.dropbear.id.au>
[Qemu-devel] [PATCH v2 6/7] Makefile: explicitly pass $(SRC_PATH) to gcovr
Posted by Alex Bennée 6 years, 11 months ago
In an out-of-tree build gcovr can get quite confused about what is
going on otherwise.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6ccb8639b0..7202ac76dc 100644
--- a/Makefile
+++ b/Makefile
@@ -964,7 +964,7 @@ $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
 %/coverage-report.html:
 	@mkdir -p $*
 	$(call quiet-command,\
-		gcovr -p --html --html-details -o $@, \
+		gcovr -r $(SRC_PATH) -p --html --html-details -o $@, \
 		"GEN", "coverage-report.html")
 
 .PHONY: coverage-report
-- 
2.20.1


Re: [Qemu-devel] [PATCH v2 6/7] Makefile: explicitly pass $(SRC_PATH) to gcovr
Posted by Philippe Mathieu-Daudé 6 years, 11 months ago
On 3/12/19 11:55 AM, Alex Bennée wrote:
> In an out-of-tree build gcovr can get quite confused about what is
> going on otherwise.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 6ccb8639b0..7202ac76dc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -964,7 +964,7 @@ $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
>  %/coverage-report.html:
>  	@mkdir -p $*
>  	$(call quiet-command,\
> -		gcovr -p --html --html-details -o $@, \
> +		gcovr -r $(SRC_PATH) -p --html --html-details -o $@, \
>  		"GEN", "coverage-report.html")
>  
>  .PHONY: coverage-report
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>