diff --git a/core/autogen_test_config.mk b/core/autogen_test_config.mk index d4ca56f1b8..137b1185ab 100644 --- a/core/autogen_test_config.mk +++ b/core/autogen_test_config.mk @@ -22,6 +22,17 @@ # autogen_test_config_file: Path to the test config file generated. autogen_test_config_file := $(dir $(LOCAL_BUILT_MODULE))$(LOCAL_MODULE).config +# TODO: (b/167308193) Switch to /data/local/tests/unrestricted as the default install base. +autogen_test_install_base := /data/local/tmp +# Automatically setup test root for native test. +ifeq (true,$(is_native)) + ifeq (true,$(LOCAL_VENDOR_MODULE)) + autogen_test_install_base = /data/local/tests/vendor + endif + ifeq (true,$(LOCAL_USE_VNDK)) + autogen_test_install_base = /data/local/tests/vendor + endif +endif ifeq (true,$(is_native)) ifeq ($(LOCAL_NATIVE_BENCHMARK),true) autogen_test_config_template := $(NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE) @@ -33,10 +44,11 @@ else endif endif # Auto generating test config file for native test +$(autogen_test_config_file): PRIVATE_TEST_INSTALL_BASE := $(autogen_test_install_base) $(autogen_test_config_file): PRIVATE_MODULE_NAME := $(LOCAL_MODULE) $(autogen_test_config_file) : $(autogen_test_config_template) @echo "Auto generating test config $(notdir $@)" - $(hide) sed 's&{MODULE}&$(PRIVATE_MODULE_NAME)&g;s&{EXTRA_CONFIGS}&&g' $< > $@ + $(hide) sed 's&{MODULE}&$(PRIVATE_MODULE_NAME)&g;s&{TEST_INSTALL_BASE}&$(PRIVATE_TEST_INSTALL_BASE)&g;s&{EXTRA_CONFIGS}&&g' $< > $@ my_auto_generate_config := true else # Auto generating test config file for instrumentation test diff --git a/core/native_test_config_template.xml b/core/native_test_config_template.xml index ef1818f776..ea982cf2f9 100644 --- a/core/native_test_config_template.xml +++ b/core/native_test_config_template.xml @@ -22,11 +22,11 @@ -