diff options
author | Ying Wang <wangying@google.com> | 2014-10-01 11:46:30 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-10-01 11:46:30 -0700 |
commit | 89ec798796e535441f8aa40512db2432854aef2b (patch) | |
tree | 194a7ac18719f9f2077b9f47cdcfd5e8533a2c9c /core/tasks/cts.mk | |
parent | fc6d5b6a947fa80061778639290c0241b93635b4 (diff) | |
download | build-89ec798796e535441f8aa40512db2432854aef2b.zip build-89ec798796e535441f8aa40512db2432854aef2b.tar.gz build-89ec798796e535441f8aa40512db2432854aef2b.tar.bz2 |
Add split apks to the cts package.
With split apk support, we may have multilple installed files for a
module. Use ALL_MODULES.$(module).BUILT_INSTALLED to make sure get
every split apk included.
Bug: 16947729
Change-Id: I4e41c2586f1b25f4810b67cd1e948aba0cbcf97b
Diffstat (limited to 'core/tasks/cts.mk')
-rw-r--r-- | core/tasks/cts.mk | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk index 2638de7..156f3df 100644 --- a/core/tasks/cts.mk +++ b/core/tasks/cts.mk @@ -71,11 +71,20 @@ CTS_TEST_JAR_FILES := $(foreach c,$(CTS_TEST_JAR_LIST),$(call intermediates-dir- -include cts/CtsTestCaseList.mk CTS_CASE_LIST := $(CTS_CORE_CASE_LIST) $(CTS_TEST_CASE_LIST) +# A module may have mutliple installed files (e.g. split apks) +CTS_CASE_LIST_APKS := +CTS_CASE_LIST_APKS_DIR := $(cts_dir)/$(cts_name)/repository/testcases/ +$(foreach m, $(CTS_CASE_LIST),\ + $(foreach fp, $(ALL_MODULES.$(m).BUILT_INSTALLED),\ + $(eval pair := $(subst :,$(space),$(fp)))\ + $(eval built := $(word 1,$(pair)))\ + $(eval installed := $(CTS_CASE_LIST_APKS_DIR)/$(notdir $(word 2,$(pair))))\ + $(eval $(call copy-one-file, $(built), $(installed)))\ + $(eval CTS_CASE_LIST_APKS += $(installed)))) + DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans -CTS_TEST_CASE_LIST_FILES := $(foreach c, $(CTS_TEST_CASE_LIST), $(call intermediates-dir-for,APPS,$(c))/package.apk) -$(cts_dir)/all_cts_files_stamp: $(CTS_CORE_CASES) $(CTS_TEST_CASES) $(CTS_TEST_CASE_LIST_FILES) $(JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(VMTESTSTF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP) $(CTS_TEST_JAR_FILES) +$(cts_dir)/all_cts_files_stamp: $(CTS_CORE_CASES) $(CTS_TEST_CASES) $(CTS_CASE_LIST_APKS) $(JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(VMTESTSTF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP) $(CTS_TEST_JAR_FILES) # Make necessary directory for CTS - $(hide) rm -rf $(PRIVATE_CTS_DIR) $(hide) mkdir -p $(TMP_DIR) $(hide) mkdir -p $(PRIVATE_DIR)/docs $(hide) mkdir -p $(PRIVATE_DIR)/tools @@ -86,7 +95,6 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CORE_CASES) $(CTS_TEST_CASES) $(CTS_TEST_C $(hide) $(ACP) -fp $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(PRIVATE_DIR)/tools # Change mode of the executables $(foreach jar,$(CTS_TEST_JAR_LIST),$(call copy-testcase-jar,$(jar))) - $(foreach apk,$(CTS_CASE_LIST),$(call copy-testcase-apk,$(apk))) $(foreach testcase,$(CTS_TEST_CASES),$(call copy-testcase,$(testcase))) $(hide) touch $@ @@ -354,12 +362,6 @@ $(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN) cts: $(INTERNAL_CTS_TARGET) adb $(call dist-for-goals,cts,$(INTERNAL_CTS_TARGET)) -define copy-testcase-apk - -$(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,$(1))/package.apk \ - $(PRIVATE_DIR)/repository/testcases/$(1).apk - -endef define copy-testcase @@ -373,4 +375,3 @@ $(hide) $(ACP) -fp $(call intermediates-dir-for,JAVA_LIBRARIES,$(1))/javalib.jar $(PRIVATE_DIR)/repository/testcases/$(1).jar endef - |