Change the push test path for atest
When running atest, tradefed will push the unittest executable and test
data files to the test path on the device. And on cuttlefish, we
encounter a selinux denial when the test accessing /data/local/tmp.
avc: denied { read } for path="/data/local/tmp/update_engine_unittests/x86/gen/disk_ext2_unittest.img" dev="dm-4" ino=2643 scontext=u:r:kernel:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
The directory under /data/nativetest has a different label
'update_engine_data_file' which kernel already has access to. Move
the path in the test config so that we can avoid granting the access
to shell_data_file.
Bug: 149942139
Test: atest update_engine_unittests
Change-Id: Id71cb18b80b70f6119fe27b7c9d9e49f86324089
diff --git a/test_config.xml b/test_config.xml
index 2639e7f..fe3cbfd 100644
--- a/test_config.xml
+++ b/test_config.xml
@@ -16,13 +16,14 @@
<configuration description="Config to run update_engine_unittests on device">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
- <option name="push" value="update_engine_unittests->/data/local/tmp/update_engine_unittests" />
+ <option name="push" value="update_engine_unittests->/data/nativetest/update_engine_unittests" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
- <option name="native-test-device-path" value="/data/local/tmp" />
+ <option name="native-test-device-path" value="/data/nativetest" />
<!-- The following rules avoid test runner from calling the following helper executables
directly as gtests. -->
<option name="file-exclusion-filter-regex" value=".*/delta_generator$" />