/platform_testing/libraries/collectors-helper/memory/test/src/com/android/helpers/tests/ |
D | GarbageCollectionHelperTest.java | 60 }).when(mUiDevice).executeShellCommand(any()); in setUp() 83 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testOneAppToGc() 84 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testOneAppToGc() 96 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testMultipleAppsToGc() 97 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testMultipleAppsToGc() 98 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name2"); in testMultipleAppsToGc() 99 inOrder.verify(mUiDevice).executeShellCommand("kill -10 2"); in testMultipleAppsToGc() 100 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name3"); in testMultipleAppsToGc() 101 inOrder.verify(mUiDevice).executeShellCommand("kill -10 3"); in testMultipleAppsToGc() 113 inOrder.verify(mUiDevice).executeShellCommand("pidof does.not.exist"); in testSkipsGcOnDneApp() [all …]
|
D | MemLeaksHelperTest.java | 138 .executeShellCommand(matches(mMemLeaksHelper.ALL_PROCESS_CMD)); in testGetMetricsNoIncrease() 142 .executeShellCommand( in testGetMetricsNoIncrease() 312 .executeShellCommand(matches(mMemLeaksHelper.ALL_PROCESS_CMD)); in testGetMetricsHasIncrease() 316 .executeShellCommand( in testGetMetricsHasIncrease() 412 .executeShellCommand(matches(mMemLeaksHelper.ALL_PROCESS_CMD)); in testNoUnreachableMemory() 415 .executeShellCommand( in testNoUnreachableMemory() 477 .executeShellCommand(matches(mMemLeaksHelper.ALL_PROCESS_CMD)); in testNoProcessName() 480 .executeShellCommand( in testNoProcessName() 532 .executeShellCommand(matches(mMemLeaksHelper.ALL_PROCESS_CMD)); in testEnclosedProcessName() 540 .executeShellCommand( in testEnclosedProcessName() [all …]
|
/platform_testing/libraries/automotive-helpers/hardkeys-app-helper/src/android/platform/helpers/ |
D | VehicleHardKeysHelperImpl.java | 87 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_CALL"); in pressRecieveCallKey() 92 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_ENDCALL"); in pressEndCallKey() 97 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_MEDIA_NEXT"); in pressMediaNextTrackKey() 102 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_MEDIA_PREVIOUS"); in pressMediaPreviousTrackKey() 107 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_VOLUME_UP"); in tuneVolumeUpKey() 112 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_VOLUME_DOWN"); in tuneVolumeDownKey() 117 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_BRIGHTNESS_UP"); in pressBrightnessUpKey() 122 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_BRIGHTNESS_DOWN"); in pressBrightnessDownKey() 132 getSpectatioUiUtil().executeShellCommand("input keyevent KEYCODE_VOLUME_MUTE"); in tuneMuteKey() 178 String res = getSpectatioUiUtil().executeShellCommand(cmd); in getCurrentVolumeLevel() [all …]
|
/platform_testing/libraries/collectors-helper/statsd/test/src/com/android/helpers/ |
D | HelperTestUtility.java | 61 public static String executeShellCommand(String cmd) { in executeShellCommand() method in HelperTestUtility 63 return getUiDevice().executeShellCommand(cmd); in executeShellCommand() 74 executeShellCommand(CLEAR_CACHE_CMD); in clearCache() 84 executeShellCommand(killCmd); in clearApp() 92 executeShellCommand(String.format(KEYEVENT_CMD_TEMPLATE, keyCode)); in sendKeyCode() 100 executeShellCommand(String.format(LAUNCH_APP_CMD_TEMPLATE, pkgName)); in launchPackageViaAdb() 119 executeShellCommand(UNLOCK_CMD); in wakeUpAndUnlock()
|
D | CrashHelperTest.java | 116 HelperTestUtility.executeShellCommand(START_APP); in testCrashMetric() 135 HelperTestUtility.executeShellCommand(START_APP); in testNativeCrashMetric() 154 HelperTestUtility.executeShellCommand(START_APP); in testAnrMetric() 174 HelperTestUtility.executeShellCommand(START_APP); in testMultipleCrashMetric() 178 HelperTestUtility.executeShellCommand(START_APP); in testMultipleCrashMetric() 182 HelperTestUtility.executeShellCommand(START_APP); in testMultipleCrashMetric()
|
/platform_testing/libraries/health/rules/tests/src/android/platform/test/rule/ |
D | CompilationFilterRuleTest.java | 52 protected String executeShellCommand(String cmd) { in testNoAppToCompile() 53 super.executeShellCommand(cmd); in testNoAppToCompile() 71 protected String executeShellCommand(String cmd) { in testSingleAppToCompile() 72 super.executeShellCommand(cmd); in testSingleAppToCompile() 105 protected String executeShellCommand(String cmd) { in testAppToCompile_failCompilationThrows() 106 super.executeShellCommand(cmd); in testAppToCompile_failCompilationThrows() 125 protected String executeShellCommand(String cmd) { in testOneAppToCompile() 126 super.executeShellCommand(cmd); in testOneAppToCompile() 146 protected String executeShellCommand(String cmd) { in testOneAppToCompileMultipleIterations() 147 super.executeShellCommand(cmd); in testOneAppToCompileMultipleIterations() [all …]
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/io/ |
D | IoUtils.kt | 20 import android.tools.traces.executeShellCommand 27 executeShellCommand("cp $src $dst") in copyFile() 28 executeShellCommand("chmod a+r $dst") in copyFile() 42 executeShellCommand("rm $src") in moveFile() 50 val out = String(executeShellCommand("ls $file")).trim() in waitFileExists()
|
/platform_testing/libraries/device-collectors/src/test/java/android/device/collectors/ |
D | ScreenRecordCollectorTest.java | 104 doReturn("1234").when(mDevice).executeShellCommand(eq("pidof screenrecord")); in initListener() 105 doReturn("").when(mDevice).executeShellCommand(not(eq("pidof screenrecord"))); in initListener() 127 verify(mDevice, times(i)).executeShellCommand(matches("screenrecord .*video.mp4")); in testScreenRecord() 130 .executeShellCommand( in testScreenRecord() 141 verify(mDevice, times(i)).executeShellCommand(eq("pidof screenrecord")); in testScreenRecord() 142 verify(mDevice, times(i)).executeShellCommand(matches("kill -2 1234")); in testScreenRecord() 196 .executeShellCommand(matches("^.*[^1]-video.*.mp4$")); in testScreenRecord_multipleTests() 201 .executeShellCommand(endsWith(String.format("%d-video.mp4", i + 1))); in testScreenRecord_multipleTests() 206 .executeShellCommand(endsWith(String.format("%d-video%d.mp4", i + 1, p))); in testScreenRecord_multipleTests() 217 doReturn("Physical size: 1080x720 ").when(mDevice).executeShellCommand("wm size"); in testScreenRecord_qualityHigh() [all …]
|
D | SimpleperfListenerTest.java | 114 .executeShellCommand( in testSingleRecordCallsWithUiDevice() 129 .executeShellCommand( in testRecordCallsWithUiDevice() 268 doReturn("680").when(mUiDevice).executeShellCommand(eq("pidof surfaceflinger")); in testSimpleperfRecordSingleProcessEvent() 269 doReturn("").when(mUiDevice).executeShellCommand(eq("pidof simpleperf")); in testSimpleperfRecordSingleProcessEvent() 289 doReturn("680").when(mUiDevice).executeShellCommand(eq("pidof surfaceflinger")); in testSimpleperfPerRunRecordMultipleProcessEvents() 290 doReturn("1696").when(mUiDevice).executeShellCommand(eq("pidof system_server")); in testSimpleperfPerRunRecordMultipleProcessEvents() 291 doReturn("").when(mUiDevice).executeShellCommand(eq("pidof simpleperf")); in testSimpleperfPerRunRecordMultipleProcessEvents() 311 doReturn("680").when(mUiDevice).executeShellCommand(eq("pidof surfaceflinger")); in testSimpleperfPerTestRecordMultipleProcessEvents() 312 doReturn("1696").when(mUiDevice).executeShellCommand(eq("pidof system_server")); in testSimpleperfPerTestRecordMultipleProcessEvents() 313 doReturn("").when(mUiDevice).executeShellCommand(eq("pidof simpleperf")); in testSimpleperfPerTestRecordMultipleProcessEvents() [all …]
|
/platform_testing/libraries/compatibility-common-util/tests/src/com/android/compatibility/common/util/ |
D | BackupUtilsTest.java | 56 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableTrueAndEnabled_returnsTrue() 75 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableTrueAndDisabled_returnsFalse() 94 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableFalseAndEnabled_returnsTrue() 113 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableFalseAndDisabled_returnsFalse() 133 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableTrueAndEnabledAndCommandsReturnMultipleLines() 152 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenQueryCommandThrows_propagatesException() 180 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenSetCommandThrows_propagatesException() 209 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenQueryCommandReturnsInvalidString_throwsException() 237 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenQueryCommandReturnsEmptyString_throwsException() 264 protected InputStream executeShellCommand(String command) throws IOException { in testWaitForBackupInitialization_whenEnabled() [all …]
|
/platform_testing/libraries/systemui-helper/src/android/platform/helpers/ |
D | LockscreenUtils.java | 21 import static android.platform.helpers.CommonUtils.executeShellCommand; 91 executeShellCommand(format("%s %s", SET_PIN_COMMAND, lockscreenCode)); in setLockscreen() 94 executeShellCommand(format("%s %s", SET_PASSWORD_COMMAND, lockscreenCode)); in setLockscreen() 97 executeShellCommand(format("%s %s", SET_PATTERN_COMMAND, lockscreenCode)); in setLockscreen() 100 executeShellCommand(SET_SWIPE_COMMAND); in setLockscreen() 103 executeShellCommand(SET_LOCK_AS_NONE_COMMAND); in setLockscreen() 125 executeShellCommand( in resetLockscreen() 146 executeShellCommand(format("%s %s", INPUT_TEXT_COMMAND, lockscreenCode)); in enterCodeOnLockscreen() 148 executeShellCommand(format("%s %s", INPUT_KEYEVENT_COMMAND, KEYCODE_ENTER)); in enterCodeOnLockscreen()
|
/platform_testing/libraries/health/rules/src/android/platform/test/rule/ |
D | DisableAutofillRule.java | 39 String result = uiDevice.executeShellCommand("settings get secure autofill_service"); in starting() 43 uiDevice.executeShellCommand("settings put secure autofill_service null"); in starting() 53 .executeShellCommand( in finished()
|
D | RemoveAppFromStackRule.java | 64 executeShellCommand("dumpsys activity activities")); in starting() 66 executeShellCommand("am stack remove " + appActivityMatcher.group(1)); in starting()
|
D | DittoBenchRule.java | 44 mOutputFd = uiAutomation.executeShellCommand(cmd); in starting() 53 executeShellCommand("pkill " + dittoBinaryName); in finished()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/wm/ |
D | LegacyShellTransitionTraceMonitor.kt | 20 import android.tools.traces.executeShellCommand 37 executeShellCommand(START_TRACING_COMMAND) in doStart() 44 executeShellCommand(STOP_TRACING_COMMAND) in doStop()
|
/platform_testing/libraries/system-helpers/commands-helper/src/android/system/helpers/ |
D | CommandsHelper.java | 78 public String executeShellCommand(String command) { in executeShellCommand() method in CommandsHelper 80 return UiDevice.getInstance(mInstrumentation).executeShellCommand(command); in executeShellCommand() 97 return Arrays.asList(executeShellCommand(command).split(separatorChars)); in executeShellCommandAndSplitOutput() 107 return getInstance().executeShellCommand(command); in execute()
|
/platform_testing/libraries/compatibility-common-util/src/com/android/compatibility/common/util/ |
D | BackupUtils.java | 67 protected abstract InputStream executeShellCommand(String command) throws IOException; in executeShellCommand() method in BackupUtils 70 StreamUtil.drainAndClose(new InputStreamReader(executeShellCommand(command))); in executeShellCommandSync() 74 InputStream inputStream = executeShellCommand(command); in getShellCommandOutput() 166 return executeShellCommand("bmgr backupnow " + packageName); in backupNow() 174 return executeShellCommand( in backupNowForUser() 234 return executeShellCommand(String.format("bmgr restore %s %s", token, packageName)); in restore() 243 return executeShellCommand( in restoreForUser() 273 InputStream in = executeShellCommand(command); in executeShellCommandAndReturnOutput() 288 String output = getLineString(executeShellCommand("bmgr enabled")); in enableBackup() 296 Closeables.closeQuietly(executeShellCommand("bmgr enable " + enable)); in enableBackup() [all …]
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/view/ |
D | ViewTraceMonitor.kt | 20 import android.tools.traces.executeShellCommand in <lambda>() 33 String(executeShellCommand("su root settings get global view_capture_enabled")) in <lambda>() 53 val stdout = executeShellCommand("su root cmd launcherapps dump-view-hierarchies") in <lambda>() 79 executeShellCommand( in <lambda>()
|
/platform_testing/libraries/collectors-helper/memory/src/com/android/helpers/ |
D | MemhogHelper.java | 58 uiDevice.executeShellCommand(String.format(CHMOD_CMD, MEMHOG_FILE_PATH)); in startMemhog() 59 uiDevice.executeShellCommand( in startMemhog() 93 mUiDevice.executeShellCommand(MEMHOG_STOP_CMD); in stopMemhog() 117 String memhogProcId = mUiDevice.executeShellCommand(MEMHOG_PROC_ID_CMD); in isMemhogRunning()
|
D | GarbageCollectionHelper.java | 81 String pidofOutput = mUiDevice.executeShellCommand( in garbageCollect() 84 mUiDevice.executeShellCommand(String.format(GC_CMD, pidofOutput)); in garbageCollect()
|
/platform_testing/libraries/collectors-helper/system/src/com/android/helpers/ |
D | ThermalThrottlingHelper.java | 50 mUiDevice.executeShellCommand(String.format(THROTTLING_START_CMD, emulSeverity)); in startThrottling() 77 mUiDevice.executeShellCommand(THROTTLING_STOP_CMD); in stopThrottling() 99 String[] lines = mUiDevice.executeShellCommand(THROTTLING_DUMPSYS_CMD).split("\n"); in isThrottlingEnabled()
|
/platform_testing/libraries/systemui-helper/src/android/platform/helpers/foldable/ |
D | SensorInjectionController.kt | 38 executeShellCommand(SENSOR_SERVICE_ENABLE) in init() 39 executeShellCommand(SENSOR_SERVICE_DATA_INJECTION + context.packageName) in init()
|
/platform_testing/libraries/systemui-helper/src/android/platform/helpers/features/common/ |
D | SystemPowerMenu.java | 21 import static android.platform.helpers.CommonUtils.executeShellCommand; 71 executeShellCommand(POWER_COMMAND); in open()
|
/platform_testing/libraries/collectors-helper/jank/test/src/com/android/helpers/ |
D | JankCollectionHelperTest.java | 416 when(mUiDevice.executeShellCommand(cmd)).thenThrow(new RuntimeException()); in testCollect_delayExceptions_onReset() 428 .executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg1")); in testCollect_delayExceptions_onReset() 430 .executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg2")); in testCollect_delayExceptions_onReset() 432 .executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg3")); in testCollect_delayExceptions_onReset() 444 when(mUiDevice.executeShellCommand(cmd)).thenThrow(new RuntimeException()); in testCollect_withFailures_stillReportsSuccessfulPackages() 453 inOrder.verify(mUiDevice).executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg1")); in testCollect_withFailures_stillReportsSuccessfulPackages() 454 inOrder.verify(mUiDevice).executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg2")); in testCollect_withFailures_stillReportsSuccessfulPackages() 455 inOrder.verify(mUiDevice).executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg3")); in testCollect_withFailures_stillReportsSuccessfulPackages() 456 inOrder.verify(mUiDevice).executeShellCommand(String.format(GFXINFO_COMMAND_GET, "pkg1")); in testCollect_withFailures_stillReportsSuccessfulPackages() 457 inOrder.verify(mUiDevice).executeShellCommand(String.format(GFXINFO_COMMAND_GET, "pkg2")); in testCollect_withFailures_stillReportsSuccessfulPackages() [all …]
|
/platform_testing/libraries/collectors-helper/power/src/com/android/helpers/ |
D | PwrStatsUtilHelper.java | 63 output = executeShellCommand("pwrstats_util -d " + mLogFile.getAbsolutePath()); in startCollecting() 79 executeShellCommand("kill -INT " + mUtilPid); in stopCollecting() 102 protected String executeShellCommand(String command) throws IOException { in executeShellCommand() method in PwrStatsUtilHelper 108 return mDevice.executeShellCommand(command); in executeShellCommand()
|