Loading core/base_rules.mk +19 −31 Original line number Diff line number Diff line Loading @@ -371,56 +371,44 @@ endif endif ########################################################### ## Compatibiliy suite files. ## Compatibility suite files. ########################################################### ifdef LOCAL_COMPATIBILITY_SUITE ifneq ($(words $(LOCAL_COMPATIBILITY_SUITE)),1) $(error $(LOCAL_PATH):$(LOCAL_MODULE) LOCAL_COMPATIBILITY_SUITE can be only one name) endif # Copy this module into its own subdirectory in the common testcases output directory. my_testcases_subdir := $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE) # The module itself. my_compat_dist := \ $(LOCAL_BUILT_MODULE):$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(my_installed_module_stem) \ $(LOCAL_BUILT_MODULE):$(my_testcases_subdir)/$(my_installed_module_stem) $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem)))) # Make sure we only add the files once for multilib modules. ifndef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files := true # LOCAL_COMPATIBILITY_SUPPORT_FILES is a list of <src>[:<dest>]. my_compat_dist += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES),\ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES), \ $(eval p := $(subst :,$(space),$(f))) \ $(eval s := $(word 1,$(p))) \ $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \ $(eval d := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(n)) \ $(s):$(d) $(s):$(my_testcases_subdir)/$(n)) $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(s):$(dir)/$(n))))) ifneq (,$(wildcard $(LOCAL_PATH)/AndroidTest.xml)) my_compat_dist += \ $(LOCAL_PATH)/AndroidTest.xml:$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).config my_compat_dist += \ $(LOCAL_PATH)/AndroidTest.xml:$(my_testcases_subdir)/$(LOCAL_MODULE).config $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(LOCAL_PATH)/AndroidTest.xml:$(dir)/$(LOCAL_MODULE).config))) endif ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml)) my_compat_dist += \ $(LOCAL_PATH)/DynamicConfig.xml:$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).dynamic my_compat_dist += \ $(LOCAL_PATH)/DynamicConfig.xml:$(my_testcases_subdir)/$(LOCAL_MODULE).dynamic $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(LOCAL_PATH)/DynamicConfig.xml:$(dir)/$(LOCAL_MODULE).dynamic))) endif endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files my_compat_files := $(call copy-many-files, $(my_compat_dist)) COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \ $(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \ $(my_compat_files) $(call create-suite-dependencies) # Copy over the compatibility files when user runs mm/mmm. $(my_register_name) : $(my_compat_files) endif # LOCAL_COMPATIBILITY_SUITE ########################################################### Loading core/definitions.mk +24 −0 Original line number Diff line number Diff line Loading @@ -2889,6 +2889,30 @@ $(strip $(if $(filter $(TARGET_ARCH),$(1)),$(TARGET_ARCH),\ $(if $(filter $(TARGET_2ND_ARCH),$(1)),$(TARGET_2ND_ARCH),$(if $(1),none)))) endef ########################################################### ## Compatibility suite tools ########################################################### # Return a list of output directories for a given suite and the current LOCAL_MODULE define compatibility_suite_dirs $(strip \ $(COMPATIBILITY_TESTCASES_OUT_$(1)) \ $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)) endef # For each suite: # 1. Copy the files to the many suite output directories. # 2. Add all the files to each suite's dependent files list. # 3. Do the dependency addition to my_all_targets # Requires for each suite: my_compat_dist_$(suite) to be defined. define create-suite-dependencies $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_files_$(suite) := $(call copy-many-files, $(my_compat_dist_$(suite)))) \ $(eval COMPATIBILITY.$(suite).FILES := \ $(COMPATIBILITY.$(suite).FILES) $(my_compat_files_$(suite))) \ $(eval $(my_register_name) : $(my_compat_files_$(suite)))) endef ########################################################### ## Other includes ########################################################### Loading core/package_internal.mk +6 −10 Original line number Diff line number Diff line Loading @@ -636,18 +636,14 @@ ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \ $(my_register_name): $(installed_apk_splits) ifdef LOCAL_COMPATIBILITY_SUITE cts_testcase_file := $(foreach s,$(my_split_suffixes),$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_$(s).apk) $(cts_testcase_file) : $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP) $(copy-file-to-new-target) common_testcase_file := $(foreach s,$(my_split_suffixes),$($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)/$(LOCAL_MODULE)_$(s).apk) $(common_testcase_file) : $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk $(copy-file-to-new-target) COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \ $(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \ $(cts_testcase_file) $(common_testcase_file) $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(foreach s,$(my_split_suffixes),\ $(built_module_path)/package_$(s).apk:$(dir)/$(LOCAL_MODULE)_$(s).apk)))) $(call create-suite-dependencies) $(my_register_name) : $(cts_testcase_file) $(common_testcase_file) endif # LOCAL_COMPATIBILITY_SUITE endif # LOCAL_PACKAGE_SPLITS Loading Loading
core/base_rules.mk +19 −31 Original line number Diff line number Diff line Loading @@ -371,56 +371,44 @@ endif endif ########################################################### ## Compatibiliy suite files. ## Compatibility suite files. ########################################################### ifdef LOCAL_COMPATIBILITY_SUITE ifneq ($(words $(LOCAL_COMPATIBILITY_SUITE)),1) $(error $(LOCAL_PATH):$(LOCAL_MODULE) LOCAL_COMPATIBILITY_SUITE can be only one name) endif # Copy this module into its own subdirectory in the common testcases output directory. my_testcases_subdir := $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE) # The module itself. my_compat_dist := \ $(LOCAL_BUILT_MODULE):$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(my_installed_module_stem) \ $(LOCAL_BUILT_MODULE):$(my_testcases_subdir)/$(my_installed_module_stem) $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem)))) # Make sure we only add the files once for multilib modules. ifndef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files := true # LOCAL_COMPATIBILITY_SUPPORT_FILES is a list of <src>[:<dest>]. my_compat_dist += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES),\ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES), \ $(eval p := $(subst :,$(space),$(f))) \ $(eval s := $(word 1,$(p))) \ $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \ $(eval d := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(n)) \ $(s):$(d) $(s):$(my_testcases_subdir)/$(n)) $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(s):$(dir)/$(n))))) ifneq (,$(wildcard $(LOCAL_PATH)/AndroidTest.xml)) my_compat_dist += \ $(LOCAL_PATH)/AndroidTest.xml:$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).config my_compat_dist += \ $(LOCAL_PATH)/AndroidTest.xml:$(my_testcases_subdir)/$(LOCAL_MODULE).config $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(LOCAL_PATH)/AndroidTest.xml:$(dir)/$(LOCAL_MODULE).config))) endif ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml)) my_compat_dist += \ $(LOCAL_PATH)/DynamicConfig.xml:$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).dynamic my_compat_dist += \ $(LOCAL_PATH)/DynamicConfig.xml:$(my_testcases_subdir)/$(LOCAL_MODULE).dynamic $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(LOCAL_PATH)/DynamicConfig.xml:$(dir)/$(LOCAL_MODULE).dynamic))) endif endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files my_compat_files := $(call copy-many-files, $(my_compat_dist)) COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \ $(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \ $(my_compat_files) $(call create-suite-dependencies) # Copy over the compatibility files when user runs mm/mmm. $(my_register_name) : $(my_compat_files) endif # LOCAL_COMPATIBILITY_SUITE ########################################################### Loading
core/definitions.mk +24 −0 Original line number Diff line number Diff line Loading @@ -2889,6 +2889,30 @@ $(strip $(if $(filter $(TARGET_ARCH),$(1)),$(TARGET_ARCH),\ $(if $(filter $(TARGET_2ND_ARCH),$(1)),$(TARGET_2ND_ARCH),$(if $(1),none)))) endef ########################################################### ## Compatibility suite tools ########################################################### # Return a list of output directories for a given suite and the current LOCAL_MODULE define compatibility_suite_dirs $(strip \ $(COMPATIBILITY_TESTCASES_OUT_$(1)) \ $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)) endef # For each suite: # 1. Copy the files to the many suite output directories. # 2. Add all the files to each suite's dependent files list. # 3. Do the dependency addition to my_all_targets # Requires for each suite: my_compat_dist_$(suite) to be defined. define create-suite-dependencies $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_files_$(suite) := $(call copy-many-files, $(my_compat_dist_$(suite)))) \ $(eval COMPATIBILITY.$(suite).FILES := \ $(COMPATIBILITY.$(suite).FILES) $(my_compat_files_$(suite))) \ $(eval $(my_register_name) : $(my_compat_files_$(suite)))) endef ########################################################### ## Other includes ########################################################### Loading
core/package_internal.mk +6 −10 Original line number Diff line number Diff line Loading @@ -636,18 +636,14 @@ ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \ $(my_register_name): $(installed_apk_splits) ifdef LOCAL_COMPATIBILITY_SUITE cts_testcase_file := $(foreach s,$(my_split_suffixes),$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_$(s).apk) $(cts_testcase_file) : $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP) $(copy-file-to-new-target) common_testcase_file := $(foreach s,$(my_split_suffixes),$($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)/$(LOCAL_MODULE)_$(s).apk) $(common_testcase_file) : $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk $(copy-file-to-new-target) COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \ $(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \ $(cts_testcase_file) $(common_testcase_file) $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(foreach s,$(my_split_suffixes),\ $(built_module_path)/package_$(s).apk:$(dir)/$(LOCAL_MODULE)_$(s).apk)))) $(call create-suite-dependencies) $(my_register_name) : $(cts_testcase_file) $(common_testcase_file) endif # LOCAL_COMPATIBILITY_SUITE endif # LOCAL_PACKAGE_SPLITS Loading