Add support for LOCAL_COMPATIBILITY_SUITE
A module can specify itself to be a Compatibility Suite module with: LOCAL_COMPATIBILITY_SUITE := <cts-name> <cts-name> can be "cts" or any other cts name supported by the build system. The cts name's config.mk must define global variable COMPATIBILITY_TESTCASES_OUT_<cts-name> to point to the testcase output directory. This change copies the module's built file, as well as the module's AndroidTest.xml, to the testcase output directory. The build system collects all the testcase files in a global variable COMPATIBILITY.<cts-name>.FILES, which you can reference in a build task that builds the suite's zip package. Also copy over the test case files if user runs mm/mmm/etc. Change-Id: Ica0dbc4f193db7de7d395b9c686733bdac41f566
This commit is contained in:
parent
9990c094ea
commit
1624361d84
|
@ -595,6 +595,30 @@ ifdef LOCAL_2ND_ARCH_VAR_PREFIX
|
|||
endif
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
## Compatibiliy 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
|
||||
|
||||
cts_testcase_file := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(my_installed_module_stem)
|
||||
$(cts_testcase_file) : $(LOCAL_BUILT_MODULE) | $(ACP)
|
||||
$(copy-file-to-new-target)
|
||||
|
||||
cts_testcase_config := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).config
|
||||
$(cts_testcase_config) : $(LOCAL_PATH)/AndroidTest.xml
|
||||
$(copy-file-to-new-target)
|
||||
|
||||
COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \
|
||||
$(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \
|
||||
$(cts_testcase_file) $(cts_testcase_config)
|
||||
|
||||
# Copy over the compatibility files when user runs mm/mmm.
|
||||
$(my_register_name) : $(cts_testcase_file) $(cts_testcase_config)
|
||||
endif # LOCAL_COMPATIBILITY_SUITE
|
||||
|
||||
###########################################################
|
||||
## Register with ALL_MODULES
|
||||
###########################################################
|
||||
|
|
|
@ -147,6 +147,7 @@ LOCAL_OEM_MODULE:=
|
|||
LOCAL_ODM_MODULE:=
|
||||
LOCAL_PRIVILEGED_MODULE:=
|
||||
LOCAL_MODULE_OWNER:=
|
||||
LOCAL_COMPATIBILITY_SUITE:=
|
||||
LOCAL_CTS_TEST_PACKAGE:=
|
||||
LOCAL_CTS_TEST_RUNNER:=
|
||||
LOCAL_CLANG:=
|
||||
|
|
|
@ -545,6 +545,18 @@ ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
|
|||
|
||||
# Make sure to install the splits when you run "make <module_name>".
|
||||
$(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)_$(s).apk : $(built_module_path)/package_%.apk | $(ACP)
|
||||
$(copy-file-to-new-target)
|
||||
|
||||
COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \
|
||||
$(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \
|
||||
$(cts_testcase_file)
|
||||
|
||||
$(my_register_name) : $(cts_testcase_file)
|
||||
endif # LOCAL_COMPATIBILITY_SUITE
|
||||
endif # LOCAL_PACKAGE_SPLITS
|
||||
|
||||
# Save information about this package
|
||||
|
|
Loading…
Reference in New Issue