diff mbox series

[v5,15/15] Makefile.target: support per-target coverage reports

Message ID 20190430165234.32272-16-alex.bennee@linaro.org
State Superseded
Headers show
Series demacro softmmu (plus tests/coverage) | expand

Commit Message

Alex Bennée April 30, 2019, 4:52 p.m. UTC
Add support for generating a single targets coverage report. Execute:

  make coverage-report

In the target build directory. This coverage report only cares about
target specific blobs so only searches the target build subdirectory.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 Makefile.target | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

-- 
2.20.1

Comments

Richard Henderson May 1, 2019, 2:50 p.m. UTC | #1
On 4/30/19 9:52 AM, Alex Bennée wrote:
> Add support for generating a single targets coverage report. Execute:

> 

>   make coverage-report

> 

> In the target build directory. This coverage report only cares about

> target specific blobs so only searches the target build subdirectory.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  Makefile.target | 16 ++++++++++++++++

>  1 file changed, 16 insertions(+)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



r~
diff mbox series

Patch

diff --git a/Makefile.target b/Makefile.target
index ae02495951..aa5d9d6ba6 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -238,3 +238,19 @@  endif
 
 GENERATED_FILES += config-target.h
 Makefile: $(GENERATED_FILES)
+
+# Reports/Analysis
+#
+# The target specific coverage report only cares about target specific
+# blobs and not the shared code.
+#
+
+%/coverage-report.html:
+	@mkdir -p $*
+	$(call quiet-command,\
+		gcovr -r $(SRC_PATH) --object-directory $(CURDIR) \
+		-p --html --html-details -o $@, \
+		"GEN", "coverage-report.html")
+
+.PHONY: coverage-report
+coverage-report: $(CURDIR)/reports/coverage/coverage-report.html