Loading startop/iorap/functional_tests/AndroidTest.xml +5 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,11 @@ <option name="run-command" value="rm -r /data/misc/iorapd/*" /> <option name="run-command" value="sleep 1" /> <!-- Set system properties to enable perfetto tracing, readahead and detailed logging. --> <option name="run-command" value="setprop iorapd.perfetto.enable true" /> <option name="run-command" value="setprop iorapd.readahead.enable true" /> <option name="run-command" value="setprop iorapd.log.verbose true" /> <option name="run-command" value="start iorapd" /> <!-- give it some time to restart the service; otherwise the first unit test might fail --> Loading @@ -45,9 +50,5 @@ <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> startop/iorap/functional_tests/src/com/google/android/startop/iorap/IorapWorkFlowTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public class IorapWorkFlowTest { private static final String TEST_ACTIVITY_NAME = "com.android.settings.Settings"; private static final String DB_PATH = "/data/misc/iorapd/sqlite.db"; private static final Duration TIMEOUT = Duration.ofSeconds(20L); private static final Duration TIMEOUT = Duration.ofSeconds(300L); private static final String READAHEAD_INDICATOR = "Description = /data/misc/iorapd/com.android.settings/none/com.android.settings.Settings/compiled_traces/compiled_trace.pb"; Loading @@ -88,7 +88,7 @@ public class IorapWorkFlowTest { mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), TIMEOUT.getSeconds()); } @Test @Test (timeout = 300000) public void testApp() throws Exception { assertThat(mDevice, notNullValue()); Loading Loading @@ -247,7 +247,7 @@ public class IorapWorkFlowTest { if (supplier.getAsBoolean()) { return true; } TimeUnit.SECONDS.sleep(totalSleepTimeSeconds); TimeUnit.SECONDS.sleep(sleepIntervalSeconds); totalSleepTimeSeconds += sleepIntervalSeconds; if (totalSleepTimeSeconds > timeout.getSeconds()) { return false; Loading Loading @@ -367,7 +367,7 @@ public class IorapWorkFlowTest { * * <p> This should be run as root.</p> */ private String executeShellCommand(String cmd) throws Exception { private static String executeShellCommand(String cmd) throws Exception { Log.i(TAG, "Execute: " + cmd); return UiDevice.getInstance( InstrumentationRegistry.getInstrumentation()).executeShellCommand(cmd); Loading Loading
startop/iorap/functional_tests/AndroidTest.xml +5 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,11 @@ <option name="run-command" value="rm -r /data/misc/iorapd/*" /> <option name="run-command" value="sleep 1" /> <!-- Set system properties to enable perfetto tracing, readahead and detailed logging. --> <option name="run-command" value="setprop iorapd.perfetto.enable true" /> <option name="run-command" value="setprop iorapd.readahead.enable true" /> <option name="run-command" value="setprop iorapd.log.verbose true" /> <option name="run-command" value="start iorapd" /> <!-- give it some time to restart the service; otherwise the first unit test might fail --> Loading @@ -45,9 +50,5 @@ <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>
startop/iorap/functional_tests/src/com/google/android/startop/iorap/IorapWorkFlowTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public class IorapWorkFlowTest { private static final String TEST_ACTIVITY_NAME = "com.android.settings.Settings"; private static final String DB_PATH = "/data/misc/iorapd/sqlite.db"; private static final Duration TIMEOUT = Duration.ofSeconds(20L); private static final Duration TIMEOUT = Duration.ofSeconds(300L); private static final String READAHEAD_INDICATOR = "Description = /data/misc/iorapd/com.android.settings/none/com.android.settings.Settings/compiled_traces/compiled_trace.pb"; Loading @@ -88,7 +88,7 @@ public class IorapWorkFlowTest { mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), TIMEOUT.getSeconds()); } @Test @Test (timeout = 300000) public void testApp() throws Exception { assertThat(mDevice, notNullValue()); Loading Loading @@ -247,7 +247,7 @@ public class IorapWorkFlowTest { if (supplier.getAsBoolean()) { return true; } TimeUnit.SECONDS.sleep(totalSleepTimeSeconds); TimeUnit.SECONDS.sleep(sleepIntervalSeconds); totalSleepTimeSeconds += sleepIntervalSeconds; if (totalSleepTimeSeconds > timeout.getSeconds()) { return false; Loading Loading @@ -367,7 +367,7 @@ public class IorapWorkFlowTest { * * <p> This should be run as root.</p> */ private String executeShellCommand(String cmd) throws Exception { private static String executeShellCommand(String cmd) throws Exception { Log.i(TAG, "Execute: " + cmd); return UiDevice.getInstance( InstrumentationRegistry.getInstrumentation()).executeShellCommand(cmd); Loading