From aee6f602f97c45efeff7e8a840b3009d0966e62e Mon Sep 17 00:00:00 2001 From: Aaron Holden Date: Tue, 15 Dec 2015 15:04:01 -0800 Subject: [PATCH] Move suite-level dynamic config to testcases Enable client-side dynamic config code to access the suite-level dynamic config files by placing them in the testcases directory. Also update cts_v2.mk to define the location of its corresponding dynamic config file. bug:23625592 Change-Id: Id11dea4b6acbe8ea7e5e9579e369a2be5873a224 --- core/tasks/cts_v2.mk | 1 + core/tasks/tools/compatibility.mk | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/tasks/cts_v2.mk b/core/tasks/cts_v2.mk index 76a4d0225d..6bb80a14eb 100644 --- a/core/tasks/cts_v2.mk +++ b/core/tasks/cts_v2.mk @@ -14,6 +14,7 @@ test_suite_name := cts_v2 test_suite_tradefed := cts-tradefed_v2 +test_suite_dynamic_config := cts/tools/cts-tradefed/DynamicConfig.xml test_suite_readme := cts/tools/cts-tradefed/README include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk diff --git a/core/tasks/tools/compatibility.mk b/core/tasks/tools/compatibility.mk index 6216e6ef65..d8f900e4eb 100644 --- a/core/tasks/tools/compatibility.mk +++ b/core/tasks/tools/compatibility.mk @@ -17,6 +17,7 @@ # Input variables: # test_suite_name: the name of this test suite eg. cts # test_suite_tradefed: the name of this test suite's tradefed wrapper +# test_suite_dynamic_config: the path to this test suite's dynamic configuration file # test_suite_readme: the path to a README file for this test suite # Output variables: # compatibility_zip: the path to the output zip file. @@ -34,9 +35,18 @@ compatibility_zip := $(out_dir).zip $(compatibility_zip): PRIVATE_NAME := android-$(test_suite_name) $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir) $(compatibility_zip): PRIVATE_TOOLS := $(test_tools) -$(compatibility_zip): $(test_artifacts) $(test_tools) | $(ADB) $(ACP) +$(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name) +$(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config) +$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) | $(ADB) $(ACP) # Make dir structure $(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases # Copy tools $(hide) $(ACP) -fp $(PRIVATE_TOOLS) $(PRIVATE_OUT_DIR)/tools + $(if $(PRIVATE_DYNAMIC_CONFIG),$(hide) $(ACP) -fp $(PRIVATE_DYNAMIC_CONFIG) $(PRIVATE_OUT_DIR)/testcases/$(PRIVATE_SUITE_NAME).dynamic) $(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME) + +# Reset all input variables +test_suite_name := +test_suite_tradefed := +test_suite_dynamic_config := +test_suite_readme :=