From fe04351f6fbb1816c5033ca342ebd8c1a93c75fd Mon Sep 17 00:00:00 2001 From: nelsonli Date: Tue, 19 Mar 2019 16:00:45 +0800 Subject: [PATCH] Build: Ensuring test runtime dependencies are installed. After migrating the primary install location of test modules into a generic testcase folder. All test modules will install to out/target/product//testcase// if they don't specify their LOCAL_MODULE_PATH. But the dependent test module should also be copied to testcase folder even its LOCAL_MODULE_PATH be set. BUG: 128815093 Test: 1. vi cts/tests/signature/api-check/Android.mk add LOCAL_MODULE_PATH for cts-hiddenapi_flags-csv 2. m CtsHiddenApiBlacklistDebugClassTestCases Then, hiddenapi_flags.csv should also be copied to testcase folder. Change-Id: Iff872447348e74b2728e0913d04e46ccbaa4e972 --- core/base_rules.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index b2bbe46e4..742119f93 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -477,8 +477,6 @@ endif ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) ifneq ($(LOCAL_INSTALLED_MODULE),$(my_default_test_module)) -# Install into the testcase folder -$(LOCAL_INSTALLED_MODULE) : $(my_default_test_module) $(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD) $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) @echo "Install: $@" @@ -622,6 +620,13 @@ endif multi_arch := +my_default_test_module := +my_default_test_module := $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)$(arch_dir)/$(my_installed_module_stem) +ifneq ($(LOCAL_INSTALLED_MODULE),$(my_default_test_module)) +# Install into the testcase folder +$(LOCAL_INSTALLED_MODULE) : $(my_default_test_module) +endif + # The module itself. $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \