summaryrefslogtreecommitdiff
path: root/startop/iorap/tests/AndroidTest.xml
diff options
context:
space:
mode:
Diffstat (limited to 'startop/iorap/tests/AndroidTest.xml')
-rw-r--r--startop/iorap/tests/AndroidTest.xml22
1 files changed, 19 insertions, 3 deletions
diff --git a/startop/iorap/tests/AndroidTest.xml b/startop/iorap/tests/AndroidTest.xml
index bcd11033bed3..6102c44e61bf 100644
--- a/startop/iorap/tests/AndroidTest.xml
+++ b/startop/iorap/tests/AndroidTest.xml
@@ -33,18 +33,34 @@
<target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer">
</target_preparer>
+ <!-- do not use DeviceSetup#set-property because it reboots the device b/136200738.
+ furthermore the changes in /data/local.prop don't actually seem to get picked up.
+ -->
<target_preparer
class="com.android.tradefed.targetprep.DeviceSetup">
+ <!-- we need this magic flag, otherwise it always reboots and breaks the selinux -->
+ <option name="force-skip-system-props" value="true" />
+
<!-- Crash instead of using Log.wtf within the system_server iorap code. -->
- <option name="set-property" key="iorapd.forwarding_service.wtf_crash" value="true" />
+ <option name="run-command" value="setprop iorapd.forwarding_service.wtf_crash true" />
<!-- IIorapd has fake behavior: it doesn't do anything but reply with 'DONE' status -->
- <option name="set-property" key="iorapd.binder.fake" value="true" />
- <option name="restore-properties" value="true" />
+ <option name="run-command" value="setprop iorapd.binder.fake true" />
+
+ <!-- iorapd does not pick up the above changes until we restart it -->
+ <option name="run-command" value="stop iorapd" />
+ <option name="run-command" value="start iorapd" />
+ <!-- give it some time to restart the service; otherwise the first unit test might fail -->
+ <option name="run-command" value="sleep 1" />
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.google.android.startop.iorap.tests" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
</test>
+
+ <!-- using DeviceSetup again does not work. we simply leave the device in a semi-bad
+ state. there is no way to clean this up as far as I know.
+ -->
+
</configuration>