Deduplicate my_compat_dist entries globally.

Fixes: 164319611
Test: m TARGET_PRODUCT=aosp_x86_64 mts dist
Change-Id: Ie47e355ded0ce0221988a405fc77546a4a752c38
This commit is contained in:
Jaewoong Jung 2020-08-26 15:27:26 -07:00
parent ff2c7454fe
commit 046702a6ef
2 changed files with 12 additions and 2 deletions

View File

@ -110,6 +110,9 @@ ALL_DISABLED_PRESUBMIT_TESTS :=
# All compatibility suites mentioned in LOCAL_COMPATIBILITY_SUITES
ALL_COMPATIBILITY_SUITES :=
# All compatibility suite files to dist.
ALL_COMPATIBILITY_DIST_FILES :=
# All LINK_TYPE entries
ALL_LINK_TYPES :=
@ -2812,6 +2815,7 @@ endef
# 2. Add all the files to each suite's dependent files list.
# 3. Do the dependency addition to my_all_targets.
# 4. Save the module name to COMPATIBILITY.$(suite).MODULES for each suite.
# 5. Collect files to dist to ALL_COMPATIBILITY_DIST_FILES.
# Requires for each suite: use my_compat_dist_config_$(suite) to define the test config.
# and use my_compat_dist_$(suite) to define the others.
define create-suite-dependencies
@ -2824,9 +2828,11 @@ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))) \
$$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f))) \
$$(my_compat_dist_test_data_$(suite))) \
$(eval ALL_COMPATIBILITY_DIST_FILES += $$(my_compat_dist_$(suite))) \
$(eval COMPATIBILITY.$(suite).MODULES += $$(my_register_name))) \
$(eval $(my_all_targets) : $(call copy-many-files, \
$(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_$(suite))))) \
$(eval $(my_all_targets) : \
$(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE), \
$(foreach f,$(my_compat_dist_$(suite)), $(call word-colon,2,$(f))))) \
$(call copy-many-xml-files-checked, \
$(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_config_$(suite))))))
endef

View File

@ -1406,6 +1406,10 @@ $(file >$(HOST_OUT)/.installable_test_files,$(sort \
test_files :=
endif
# Dedpulicate compatibility suite dist files across modules and packages before
# copying them to their requested locations. Assign the eval result to an unused
# var to prevent Make from trying to make a sense of it.
_unused := $(call copy-many-files, $(sort $(ALL_COMPATIBILITY_DIST_FILES)))
# Don't include any GNU General Public License shared objects or static
# libraries in SDK images. GPL executables (not static/dynamic libraries)