/platform_testing/libraries/collectors-helper/memory/test/src/com/android/helpers/tests/ |
D | GarbageCollectionHelperTest.java | 43 private @Mock UiDevice mUiDevice; field in GarbageCollectionHelperTest 60 }).when(mUiDevice).executeShellCommand(any()); in setUp() 71 verifyZeroInteractions(mUiDevice); in testNoSetUp() 82 InOrder inOrder = inOrder(mUiDevice); in testOneAppToGc() 83 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testOneAppToGc() 84 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testOneAppToGc() 95 InOrder inOrder = inOrder(mUiDevice); in testMultipleAppsToGc() 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() [all …]
|
/platform_testing/libraries/collectors-helper/memory/src/com/android/helpers/ |
D | GarbageCollectionHelper.java | 41 private UiDevice mUiDevice; field in GarbageCollectionHelper 50 mUiDevice = initUiDevice(); in setUp() 73 if (mProcessNames == null || mUiDevice == null) { in garbageCollect() 81 String pidofOutput = mUiDevice.executeShellCommand( in garbageCollect() 84 mUiDevice.executeShellCommand(String.format(GC_CMD, pidofOutput)); in garbageCollect()
|
D | MemhogHelper.java | 45 private UiDevice mUiDevice; field in MemhogHelper 49 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startMemhog() 93 mUiDevice.executeShellCommand(MEMHOG_STOP_CMD); in stopMemhog() 117 String memhogProcId = mUiDevice.executeShellCommand(MEMHOG_PROC_ID_CMD); in isMemhogRunning()
|
D | ProcessShowmapHelper.java | 63 private UiDevice mUiDevice; field in ProcessShowmapHelper 78 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 139 if (processNames == null || mUiDevice == null) { in sampleMemoryOfProcesses() 160 String pidofOutput = mUiDevice.executeShellCommand( in sampleMemory() 171 showmapOutput = mUiDevice.executeShellCommand(String.format(SHOWMAP_CMD, pid)); in sampleMemory()
|
D | HeapDumpHelper.java | 59 private UiDevice mUiDevice; field in HeapDumpHelper 70 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 150 output = mUiDevice.executeShellCommand(String.format(PIDOF_CMD, processName)); in getPid() 167 return mUiDevice.executeShellCommand(heapdumpCommand); in execHeapDump() 196 mUiDevice.executeShellCommand(String.format(MV_CMD, oldFile, newFile)); in renameEmptyFile()
|
D | ShowmapSnapshotHelper.java | 87 private UiDevice mUiDevice; field in ShowmapSnapshotHelper 104 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 197 mUiDevice.executeShellCommand("dumpsys meminfo -a " + pid); in getMetrics() 268 childrenCmdOutput = mUiDevice.executeShellCommand( in getChildrenPids() 269 "pgrep -P " + mUiDevice.executeShellCommand("pidof " + processName)); in getChildrenPids() 333 mUiDevice.executeShellCommand(String.format(DROP_CACHES_CMD, cacheOption)); in dropCache() 347 String pidofOutput = mUiDevice in getPids() 373 return mUiDevice.executeShellCommand(String.format(SHOWMAP_CMD, pid)); in execShowMap() 543 String childProcessesStr = mUiDevice in updateChildProcessesDetails() 608 String psOutput = mUiDevice.executeShellCommand(ALL_PROCESSES_CMD); in getAllProcessNames() [all …]
|
D | FreeMemHelper.java | 69 private UiDevice mUiDevice; field in FreeMemHelper 74 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startCollecting() 91 memInfo = mUiDevice.executeShellCommand(PROC_MEMINFO); in getMetrics() 136 processInfoStr = mUiDevice.executeShellCommand(processDumpSysMemInfo); in getMetrics() 239 String result = mUiDevice.executeShellCommand(dropCacheScriptPath); in executeDropCachesImpl()
|
/platform_testing/libraries/systemui-helper/src/android/platform/helpers/features/common/ |
D | SystemPowerMenu.java | 49 private UiDevice mUiDevice; field in SystemPowerMenu 52 mUiDevice = uiDevice; in SystemPowerMenu() 72 mUiDevice.waitForIdle(); in open() 74 if (!mUiDevice.wait(Until.hasObject(mPageTitleSelector), OPEN_MENU_TIMEOUT_MSEC)) { in open()
|
/platform_testing/libraries/collectors-helper/system/src/com/android/helpers/ |
D | ThermalThrottlingHelper.java | 43 private UiDevice mUiDevice; field in ThermalThrottlingHelper 47 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startThrottling() 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()
|
D | DumpsysServiceHelper.java | 47 private UiDevice mUiDevice; field in DumpsysServiceHelper 63 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startCollecting() 90 String res = mUiDevice.executeShellCommand(cmd); in runDumpsysCmd()
|
/platform_testing/libraries/health/rules/tests/src/android/platform/test/rule/ |
D | UnlockScreenRuleTest.java | 89 private UiDevice mUiDevice; field in UnlockScreenRuleTest.TestableUnlockScreenRule 94 mUiDevice = Mockito.mock(UiDevice.class); in TestableUnlockScreenRule() 109 when(mUiDevice.isScreenOn()).thenReturn(mIsScreenOn); in getUiDevice() 110 when(mUiDevice.hasObject(screenLock)).thenReturn(!mIsUnlocked); in getUiDevice() 114 return mUiDevice; in getUiDevice()
|
D | SetBatteryPercentageVisibleRuleTest.java | 73 private UiDevice mUiDevice; field in SetBatteryPercentageVisibleRuleTest.TestableSetBatteryPercentageVisibleRule 78 mUiDevice = Mockito.mock(UiDevice.class); in TestableSetBatteryPercentageVisibleRule() 92 return mUiDevice; in getUiDevice()
|
D | PressHomeRuleTest.java | 83 private UiDevice mUiDevice; field in PressHomeRuleTest.TestablePressHomeRule 87 mUiDevice = Mockito.mock(UiDevice.class); in TestablePressHomeRule() 98 return mUiDevice; in getUiDevice()
|
/platform_testing/libraries/device-collectors/src/test/java/android/device/collectors/ |
D | SimpleperfListenerTest.java | 70 @Mock private UiDevice mUiDevice; field in SimpleperfListenerTest 81 mSimpleperfHelperVisibleUidevice = spy(new SimpleperfHelper(mUiDevice)); in setUp() 113 verify(mUiDevice, times(1)) in testSingleRecordCallsWithUiDevice() 128 verify(mUiDevice, times(1)) 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() [all …]
|
/platform_testing/libraries/sts-common-util/device-side/tests/src/com/android/sts/common/util/ |
D | DumpsysUtilsTest.java | 46 private UiDevice mUiDevice; field in DumpsysUtilsTest 57 mUiDevice = UiDevice.getInstance(instrumentation); in setUp() 68 mUiDevice.pressHome(); in tearDown() 69 mUiDevice.wait(Until.gone(mSelector), 5_000L /* timeout */); in tearDown()
|
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper2/ |
D | LauncherStrategyFactory.java | 36 private UiDevice mUiDevice; field in LauncherStrategyFactory 42 mUiDevice = uiDevice; in LauncherStrategyFactory() 114 String launcherPkg = mUiDevice.getLauncherPackageName(); in getLauncherStrategy() 118 strategy.setUiDevice(mUiDevice); in getLauncherStrategy()
|
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper/ |
D | LauncherStrategyFactory.java | 35 private UiDevice mUiDevice; field in LauncherStrategyFactory 41 mUiDevice = uiDevice; in LauncherStrategyFactory() 107 String launcherPkg = mUiDevice.getLauncherPackageName(); in getLauncherStrategy() 111 strategy.setUiDevice(mUiDevice); in getLauncherStrategy()
|
/platform_testing/libraries/collectors-helper/jank/test/src/com/android/helpers/ |
D | JankCollectionHelperTest.java | 97 private @Mock UiDevice mUiDevice; field in JankCollectionHelperTest 104 when(mHelper.getDevice()).thenReturn(mUiDevice); in setUp() 416 when(mUiDevice.executeShellCommand(cmd)).thenThrow(new RuntimeException()); in testCollect_delayExceptions_onReset() 426 InOrder inOrder = inOrder(mUiDevice); in testCollect_delayExceptions_onReset() 427 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onReset() 429 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onReset() 431 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onReset() 444 when(mUiDevice.executeShellCommand(cmd)).thenThrow(new RuntimeException()); in testCollect_withFailures_stillReportsSuccessfulPackages() 452 InOrder inOrder = inOrder(mUiDevice); in testCollect_withFailures_stillReportsSuccessfulPackages() 453 inOrder.verify(mUiDevice).executeShellCommand(String.format(GFXINFO_COMMAND_RESET, "pkg1")); in testCollect_withFailures_stillReportsSuccessfulPackages() [all …]
|
D | SfStatsCollectionHelperTest.java | 134 private @Mock UiDevice mUiDevice; field in SfStatsCollectionHelperTest 141 when(mHelper.getDevice()).thenReturn(mUiDevice); in setUp() 289 when(mUiDevice.executeShellCommand(SFSTATS_COMMAND_ENABLE_AND_CLEAR)).thenReturn(""); in mockEnableAndClearCommand() 293 when(mUiDevice.executeShellCommand(SFSTATS_COMMAND_DUMP)).thenReturn(SFSTATS_DUMP); in mockDumpCommand() 297 when(mUiDevice.executeShellCommand(SFSTATS_COMMAND_DISABLE_AND_CLEAR)).thenReturn(""); in mockDisableAndClearCommand()
|
/platform_testing/libraries/collectors-helper/simpleperf/src/com/android/helpers/ |
D | SimpleperfHelper.java | 56 private final UiDevice mUiDevice; field in SimpleperfHelper 61 mUiDevice = uidevice; in SimpleperfHelper() 65 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in SimpleperfHelper() 91 String startOutput = mUiDevice.executeShellCommand(startCommand); in startCollecting() 155 String stopOutput = mUiDevice.executeShellCommand(SIMPLEPERF_STOP_CMD); in stopSimpleperf() 192 mUiDevice.executeShellCommand(reportCommand); in getSimpleperfReport() 276 return mUiDevice.executeShellCommand("pidof " + process).trim(); in getPID() 290 String simpleperfProcId = mUiDevice.executeShellCommand(SIMPLEPERF_PROC_ID_CMD); in isSimpleperfRunning() 328 mUiDevice.executeShellCommand( in copyFileOutput()
|
/platform_testing/libraries/system-helpers/sysui-helper/src/android/system/helpers/ |
D | ThemeHelper.java | 50 @NonNull private final UiDevice mUiDevice; field in ThemeHelper 55 mUiDevice = uiDevice; in ThemeHelper() 70 mUiDevice.getDisplayWidth(), in setWallpaper() 71 mUiDevice.getDisplayHeight(), in setWallpaper() 131 mUiDevice.takeScreenshot(f); in takeScreenshotToFile()
|
/platform_testing/libraries/collectors-helper/lyric/test/src/com/android/helpers/ |
D | LyricMemProfilerHelperTest.java | 51 private @Mock UiDevice mUiDevice; field in LyricMemProfilerHelperTest 202 .when(mUiDevice) in setUp() 509 InOrder inOrder = inOrder(mUiDevice); in testProfilePeriodLessThanMin() 513 inOrder.verify(mUiDevice).executeShellCommand("pgrep -f -o provider@"); in testProfilePeriodLessThanMin() 514 inOrder.verify(mUiDevice).executeShellCommand("pgrep -f -o cameraserver"); in testProfilePeriodLessThanMin() 515 inOrder.verify(mUiDevice).executeShellCommand("pgrep -f -o id.GoogleCamera"); in testProfilePeriodLessThanMin() 520 verifyNoMoreInteractions(mUiDevice); in testProfilePeriodLessThanMin() 576 InOrder inOrder = inOrder(mUiDevice); in testSetNewPidName() 586 inOrder.verify(mUiDevice).executeShellCommand("pgrep -f -o " + newProviderPidName); in testSetNewPidName() 587 inOrder.verify(mUiDevice).executeShellCommand("pgrep -f -o " + newServerPidName); in testSetNewPidName() [all …]
|
/platform_testing/libraries/collectors-helper/lyric/src/com/android/helpers/ |
D | LyricMemProfilerHelper.java | 99 private UiDevice mUiDevice; field in LyricMemProfilerHelper 145 if (null == mUiDevice) { in startCollecting() 146 mUiDevice = initUiDevice(); in startCollecting() 349 procPid = mUiDevice.executeShellCommand(PID_CMD + procName).trim(); in getProcPid() 362 return mUiDevice.executeShellCommand(cmdString).trim(); in getMemInfoString() 372 if (null != mUiDevice) { in getDmabufDumpString() 378 dmabufString = mUiDevice.executeShellCommand(DMABUF_DUMP_CMD).trim(); in getDmabufDumpString()
|
D | LyricCpuUtilizationHelper.java | 67 private UiDevice mUiDevice; field in LyricCpuUtilizationHelper 71 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startCollecting() 78 String res = mUiDevice.executeShellCommand(DUMPSYS_CMD); in getMetrics()
|
/platform_testing/libraries/collectors-helper/generic/src/com/android/helpers/ |
D | GenericExecutableCollectorHelper.java | 46 private UiDevice mUiDevice; field in GenericExecutableCollectorHelper 56 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 158 return mUiDevice.executeShellCommand(command); in executeShellCommand()
|