Improve error message for artifacts outside requirement

Print the allowed paths as part of the error message.

Test: m
Change-Id: Ieb6303f39260ce83232b1c9a0a30e8cac76e2c9c
This commit is contained in:
Anton Hansson 2019-09-24 12:38:58 +01:00
parent 30648c3a21
commit ee07ef0019
1 changed files with 3 additions and 1 deletions

View File

@ -1353,7 +1353,9 @@ $(call dist-for-goals,droidcore,$(CERTIFICATE_VIOLATION_MODULES_FILENAME))
$(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \
$(eval files := $(call product-installed-files, $(makefile))) \
$(eval offending_files := $(filter-out $(path_patterns) $(whitelist_patterns) $(static_whitelist_patterns),$(files))) \
$(call maybe-print-list-and-error,$(offending_files),$(makefile) produces files outside its artifact path requirement.) \
$(call maybe-print-list-and-error,$(offending_files),\
$(makefile) produces files outside its artifact path requirement. \
Allowed paths are $(subst $(space),$(comma)$(space),$(addsuffix *,$(requirements)))) \
$(eval unused_whitelist := $(filter-out $(files),$(whitelist_patterns))) \
$(call maybe-print-list-and-error,$(unused_whitelist),$(makefile) includes redundant whitelist entries in its artifact path requirement.) \
$(eval ### Optionally verify that nothing else produces files inside this artifact path requirement.) \