Loading core/autogen_test_config.mk +13 −1 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,17 @@ # autogen_test_config_file: Path to the test config file generated. # autogen_test_config_file: Path to the test config file generated. autogen_test_config_file := $(dir $(LOCAL_BUILT_MODULE))$(LOCAL_MODULE).config 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 (true,$(is_native)) ifeq ($(LOCAL_NATIVE_BENCHMARK),true) ifeq ($(LOCAL_NATIVE_BENCHMARK),true) autogen_test_config_template := $(NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE) autogen_test_config_template := $(NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE) Loading @@ -33,10 +44,11 @@ else endif endif endif endif # Auto generating test config file for native test # 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): PRIVATE_MODULE_NAME := $(LOCAL_MODULE) $(autogen_test_config_file) : $(autogen_test_config_template) $(autogen_test_config_file) : $(autogen_test_config_template) @echo "Auto generating test config $(notdir $@)" @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 my_auto_generate_config := true else else # Auto generating test config file for instrumentation test # Auto generating test config file for instrumentation test Loading core/native_test_config_template.xml +2 −2 Original line number Original line Diff line number Diff line Loading @@ -22,11 +22,11 @@ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <option name="cleanup" value="true" /> <option name="cleanup" value="true" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> <option name="push" value="{MODULE}->{TEST_INSTALL_BASE}/{MODULE}" /> </target_preparer> </target_preparer> <test class="com.android.tradefed.testtype.GTest" > <test class="com.android.tradefed.testtype.GTest" > <option name="native-test-device-path" value="/data/local/tmp" /> <option name="native-test-device-path" value="{TEST_INSTALL_BASE}" /> <option name="module-name" value="{MODULE}" /> <option name="module-name" value="{MODULE}" /> </test> </test> </configuration> </configuration> Loading
core/autogen_test_config.mk +13 −1 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,17 @@ # autogen_test_config_file: Path to the test config file generated. # autogen_test_config_file: Path to the test config file generated. autogen_test_config_file := $(dir $(LOCAL_BUILT_MODULE))$(LOCAL_MODULE).config 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 (true,$(is_native)) ifeq ($(LOCAL_NATIVE_BENCHMARK),true) ifeq ($(LOCAL_NATIVE_BENCHMARK),true) autogen_test_config_template := $(NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE) autogen_test_config_template := $(NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE) Loading @@ -33,10 +44,11 @@ else endif endif endif endif # Auto generating test config file for native test # 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): PRIVATE_MODULE_NAME := $(LOCAL_MODULE) $(autogen_test_config_file) : $(autogen_test_config_template) $(autogen_test_config_file) : $(autogen_test_config_template) @echo "Auto generating test config $(notdir $@)" @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 my_auto_generate_config := true else else # Auto generating test config file for instrumentation test # Auto generating test config file for instrumentation test Loading
core/native_test_config_template.xml +2 −2 Original line number Original line Diff line number Diff line Loading @@ -22,11 +22,11 @@ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <option name="cleanup" value="true" /> <option name="cleanup" value="true" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> <option name="push" value="{MODULE}->{TEST_INSTALL_BASE}/{MODULE}" /> </target_preparer> </target_preparer> <test class="com.android.tradefed.testtype.GTest" > <test class="com.android.tradefed.testtype.GTest" > <option name="native-test-device-path" value="/data/local/tmp" /> <option name="native-test-device-path" value="{TEST_INSTALL_BASE}" /> <option name="module-name" value="{MODULE}" /> <option name="module-name" value="{MODULE}" /> </test> </test> </configuration> </configuration>