From 7be0847cdc2c2ec6d69331ac25ae8b35c19e2d05 Mon Sep 17 00:00:00 2001 From: Simran Basi Date: Wed, 25 Jan 2017 15:11:55 -0800 Subject: Output *TS testcases to common testcase folders. Aggregates the different *TS testcases into two common folders, one under each the host and product hierarchies. Bug: 34715822 Test: `make cts -j` and checked the contents of both: out/host/linux-x86/testcases/ & out/host/linux-x86/cts/android-cts/testcases/ Change-Id: I7d5201998ddcb011ecc687c272a0d0a36da248b7 (cherry picked from commit adf63b777a9b7ef1f223f01f3686ed7eb6b48119) Merged-In: I7d5201998ddcb011ecc687c272a0d0a36da248b7 --- core/base_rules.mk | 12 +++++++++--- core/envsetup.mk | 7 +++++++ core/package_internal.mk | 7 +++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 6722af4f27..259d03e6bf 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -377,7 +377,8 @@ endif # The module itself. my_compat_dist := \ - $(LOCAL_BUILT_MODULE):$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(my_installed_module_stem) + $(LOCAL_BUILT_MODULE):$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(my_installed_module_stem) \ + $(LOCAL_BUILT_MODULE):$($(my_prefix)OUT_TESTCASES)/$(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 @@ -387,17 +388,22 @@ $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files := true my_compat_dist += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES),\ $(eval p := $(subst :,$(space),$(f)))\ $(eval s := $(word 1,$(p)))\ - $(eval d := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(or $(word 2,$(p)),$(notdir $(word 1,$(p)))))\ - $(s):$(d)) + $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \ + $(eval d := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(n)) \ + $(s):$(d) $(s):$($(my_prefix)OUT_TESTCASES)/$(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_prefix)OUT_TESTCASES)/$(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_prefix)OUT_TESTCASES)/$(LOCAL_MODULE).dynamic endif endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files diff --git a/core/envsetup.mk b/core/envsetup.mk index 0a72603372..419a6c6c6f 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -245,6 +245,9 @@ HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib +HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest +HOST_CROSS_OUT_COVERAGE := $(HOST_CROSS_OUT)/coverage +HOST_OUT_TESTCASES := $(HOST_OUT)/testcases HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj HOST_OUT_HEADERS := $(HOST_OUT_INTERMEDIATES)/include @@ -271,6 +274,8 @@ $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_2ND_ARCH_ $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES) $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT_JAVA_LIBRARIES) +$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest +$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES := $(HOST_OUT_TESTCASES) # The default host library path. # It always points to the path where we build libraries in the default bitness. @@ -321,6 +326,7 @@ TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars TARGET_OUT_ETC := $(TARGET_OUT)/etc TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages +TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases # Out for TARGET_2ND_ARCH TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) @@ -332,6 +338,7 @@ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_A $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED) +$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES := $(TARGET_OUT_TESTCASES) TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA) TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) diff --git a/core/package_internal.mk b/core/package_internal.mk index 551f18e57b..0852b27b4b 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -639,12 +639,15 @@ 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)_$(s).apk) +$(common_testcase_file) : $($(my_prefix)OUT_TESTCASES)/$(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) + $(cts_testcase_file) $(common_testcase_file) -$(my_register_name) : $(cts_testcase_file) +$(my_register_name) : $(cts_testcase_file) $(common_testcase_file) endif # LOCAL_COMPATIBILITY_SUITE endif # LOCAL_PACKAGE_SPLITS -- cgit v1.2.3 From 62541f396aefcdad0978650272d5b8f11b0927a4 Mon Sep 17 00:00:00 2001 From: Simran Basi Date: Wed, 8 Feb 2017 15:53:32 -0800 Subject: Output *TS testcases to their own subdir in the common testcase folders. Instead of dumping all *TS testcases into the common testcase directory directly, place them all in their own subdirectory. Bug: 35153177 Test: `make cts -j` and checked the contents of both: out/host/linux-x86/testcases/ & out/host/linux-x86/cts/android-cts/testcases/ Change-Id: I22a768dba58d40be1e61885534fb813e7ff08c99 (cherry picked from commit 3fb354cca08ec30cb6aade8da3f4b5ddd119b227) Merged-In: I22a768dba58d40be1e61885534fb813e7ff08c99 --- core/base_rules.mk | 11 +++++++---- core/package_internal.mk | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 259d03e6bf..172ca60239 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -375,10 +375,13 @@ 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_prefix)OUT_TESTCASES)/$(my_installed_module_stem) + $(LOCAL_BUILT_MODULE):$(my_testcases_subdir)/$(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 @@ -390,20 +393,20 @@ my_compat_dist += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES),\ $(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_prefix)OUT_TESTCASES)/$(n)) + $(s):$(d) $(s):$(my_testcases_subdir)/$(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_prefix)OUT_TESTCASES)/$(LOCAL_MODULE).config + $(LOCAL_PATH)/AndroidTest.xml:$(my_testcases_subdir)/$(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_prefix)OUT_TESTCASES)/$(LOCAL_MODULE).dynamic + $(LOCAL_PATH)/DynamicConfig.xml:$(my_testcases_subdir)/$(LOCAL_MODULE).dynamic endif endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files diff --git a/core/package_internal.mk b/core/package_internal.mk index 0852b27b4b..0a7f37192e 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -639,8 +639,8 @@ 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)_$(s).apk) -$(common_testcase_file) : $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk +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 := \ -- cgit v1.2.3 From 0a0732aa57f541ae609bc93f81a7d2b40ad78e08 Mon Sep 17 00:00:00 2001 From: Simran Basi Date: Fri, 10 Feb 2017 15:40:43 -0800 Subject: Update CleanSpec.mk for the common testcase directories. Fix an issue with incremental builds and the new common testcase directories. Bug: None Test: Removed https://android-review.googlesource.com/#/c/234478/ then ran `m cts-platform-version-check` then reapplied the change to verify the failure. Then applied this new change to verify the problem was resolved. Change-Id: I77529021e852af35571fb99537d87100010b47af (cherry picked from commit 7fe57cfdcdc086871300d37cf6e80bc94f85b5ee) Merged-In: I77529021e852af35571fb99537d87100010b47af --- CleanSpec.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CleanSpec.mk b/CleanSpec.mk index 3c8d6ceb9c..b311470571 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -374,6 +374,9 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*) # $(PRODUCT_OUT)/recovery/root/sdcard goes from symlink to folder. $(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sdcard) +$(call add-clean-step, rm -rf $(HOST_OUT_TESTCASES)) +$(call add-clean-step, rm -rf $(TARGET_OUT_TESTCASES)) + # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ -- cgit v1.2.3 From 1991d29026b4661f7af016e7d4379d46dce83cc4 Mon Sep 17 00:00:00 2001 From: Simran Basi Date: Thu, 16 Feb 2017 18:04:10 -0800 Subject: Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories. 1) Updates the LOCAL_COMPATIBILITY_SUITE line to allow for a testcase to belong to multiple suites. 2) Building testcases no longer fails if COMPATIBILITY_TESTCASES_OUT_ is not defined. This testcase will just not output to that directory. This will be utilized by the device-tests and general-tests suites that don't require any extra output besides the common testcase directory. Bug: 35394351 Test: 1) Added multiple *TS testcases to cts & vts and verified they ended up in the common directory and each suite's testcase directory. Specifically tested CtsSplitApp to ensure the split usecase still works as well. 2) Added a CTS testcase to the device-tests suite, built device-tests and verified the cts/android-cts/testcases copy was not produced. Change-Id: Ic4c4e87e62be4fc0c5e394d88cc359518346dffa (cherry picked from commit 6bea37c7fa775e5aa729d1c4f8792b39e9e7aaba) Merged-In: Ic4c4e87e62be4fc0c5e394d88cc359518346dffa --- core/base_rules.mk | 50 ++++++++++++++++++------------------------------ core/definitions.mk | 24 +++++++++++++++++++++++ core/package_internal.mk | 16 ++++++---------- 3 files changed, 49 insertions(+), 41 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 172ca60239..0e3bd6893a 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -368,56 +368,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 [:]. -my_compat_dist += $(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 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))))) \ + $(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 ########################################################### diff --git a/core/definitions.mk b/core/definitions.mk index b9ef4d57f1..cadad6e8fb 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2886,6 +2886,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 ########################################################### diff --git a/core/package_internal.mk b/core/package_internal.mk index 0a7f37192e..78cc735603 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -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 -- cgit v1.2.3