From 90e671a9b2a92ec80d671c249f6bdb876bf37d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 30 Apr 2019 14:44:10 +0100 Subject: Makefile.target: support per-target coverage reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Richard Henderson --- Makefile.target | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile.target b/Makefile.target index 4ef4ce5..ecd856e 100644 --- a/Makefile.target +++ b/Makefile.target @@ -238,3 +238,19 @@ endif generated-files-y += config-target.h Makefile: $(generated-files-y) + +# 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 -- cgit v1.1