Merge "Include shared host liraries in test suite zip"

This commit is contained in:
Dan Shi
2020-04-14 23:10:51 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 5 deletions

View File

@@ -740,15 +740,18 @@ $(if $(_all_deps_for_$(1)_set_),$(_all_deps_for_$(1)_),\
$(_all_deps_for_$(1)_)) $(_all_deps_for_$(1)_))
endef endef
# Scan all modules in general-tests and device-tests suite and flatten the # Scan all modules in general-tests, device-tests and other selected suites and
# shared library dependencies. # flatten the shared library dependencies.
define update-host-shared-libs-deps-for-suites define update-host-shared-libs-deps-for-suites
$(foreach suite,general-tests device-tests,\ $(foreach suite,general-tests device-tests vts,\
$(foreach m,$(COMPATIBILITY.$(suite).MODULES),\ $(foreach m,$(COMPATIBILITY.$(suite).MODULES),\
$(eval my_deps := $(call get-all-shared-libs-deps,$(m)))\ $(eval my_deps := $(call get-all-shared-libs-deps,$(m)))\
$(foreach dep,$(my_deps),\ $(foreach dep,$(my_deps),\
$(foreach f,$(ALL_MODULES.$(dep).HOST_SHARED_LIBRARY_FILES),\ $(foreach f,$(ALL_MODULES.$(dep).HOST_SHARED_LIBRARY_FILES),\
$(eval target := $(HOST_OUT_TESTCASES)/$(lastword $(subst /, ,$(dir $(f))))/$(notdir $(f)))\ $(if $(filter $(suite),device-tests general-tests),\
$(eval my_testcases := $(HOST_OUT_TESTCASES)),\
$(eval my_testcases := $$(COMPATIBILITY_TESTCASES_OUT_$(suite))))\
$(eval target := $(my_testcases)/$(lastword $(subst /, ,$(dir $(f))))/$(notdir $(f)))\
$(eval COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES := \ $(eval COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES := \
$$(COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES) $(f):$(target))\ $$(COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES) $(f):$(target))\
$(eval COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES := \ $(eval COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES := \

View File

@@ -42,13 +42,16 @@ test_tools := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar \
test_tools += $(test_suite_tools) test_tools += $(test_suite_tools)
# Include host shared libraries
host_shared_libs := $(call copy-many-files, $(COMPATIBILITY.$(test_suite_name).HOST_SHARED_LIBRARY.FILES))
compatibility_zip := $(out_dir).zip compatibility_zip := $(out_dir).zip
$(compatibility_zip): PRIVATE_NAME := android-$(test_suite_name) $(compatibility_zip): PRIVATE_NAME := android-$(test_suite_name)
$(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir) $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir)
$(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(test_suite_prebuilt_tools) $(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(test_suite_prebuilt_tools)
$(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name) $(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name)
$(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config) $(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config)
$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_prebuilt_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) | $(ADB) $(ACP) $(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_prebuilt_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) $(host_shared_libs) | $(ADB) $(ACP)
# Make dir structure # Make dir structure
$(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases $(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases
$(hide) echo $(BUILD_NUMBER_FROM_FILE) > $(PRIVATE_OUT_DIR)/tools/version.txt $(hide) echo $(BUILD_NUMBER_FROM_FILE) > $(PRIVATE_OUT_DIR)/tools/version.txt
@@ -65,3 +68,4 @@ test_suite_dynamic_config :=
test_suite_readme := test_suite_readme :=
test_suite_prebuilt_tools := test_suite_prebuilt_tools :=
test_suite_tools := test_suite_tools :=
host_shared_libs :=