update build rules to use /data/local/tests/unrestricted

... for native tests. This new location has the appropriate
settings for debuggerd to generate valid backtraces in case
of test binary crash.

Bug: 167308193
Bug: 199904562
Test: compile
Change-Id: Id727355ecc87415ba1e7ccc41ec55d2f6f5fc6f1
This commit is contained in:
Guang Zhu 2021-09-14 10:58:14 -07:00
parent 7039269418
commit a736c45a95
4 changed files with 7 additions and 8 deletions

View File

@ -22,8 +22,7 @@
# 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
autogen_test_install_base := /data/local/tests/unrestricted
# Automatically setup test root for native test.
ifeq (true,$(is_native))
ifeq (true,$(LOCAL_VENDOR_MODULE))

View File

@ -22,10 +22,10 @@
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
<option name="push" value="{MODULE}->/data/local/tests/unrestricted/{MODULE}" />
</target_preparer>
<test class="com.android.tradefed.testtype.GoogleBenchmarkTest" >
<option name="native-benchmark-device-path" value="/data/local/tmp" />
<option name="native-benchmark-device-path" value="/data/local/tests/unrestricted" />
<option name="benchmark-module-name" value="{MODULE}" />
</test>
</configuration>

View File

@ -17,11 +17,11 @@
<configuration description="Config to run {MODULE} rust benchmark tests.">
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="false" />
<option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
<option name="push" value="{MODULE}->/data/local/tests/unrestricted/{MODULE}" />
</target_preparer>
<test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
<option name="test-device-path" value="/data/local/tmp" />
<option name="test-device-path" value="/data/local/tests/unrestricted" />
<option name="module-name" value="{MODULE}" />
<option name="is-benchmark" value="true" />
</test>

View File

@ -17,11 +17,11 @@
<configuration description="Config to run {MODULE} device tests.">
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
<option name="push" value="{MODULE}->/data/local/tests/unrestricted/{MODULE}" />
</target_preparer>
<test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
<option name="test-device-path" value="/data/local/tmp" />
<option name="test-device-path" value="/data/local/tests/unrestricted" />
<option name="module-name" value="{MODULE}" />
</test>
</configuration>