/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | RunUtilTest.java | 54 private RunUtil mRunUtil; field in RunUtilTest 66 mRunUtil = new RunUtil(new CommandInterrupter()); in setUp() 120 mRunUtil.runTimed(SHORT_TIMEOUT_MS, mockRunnable, true)); in testRunTimed() 133 mRunUtil.runTimed(SHORT_TIMEOUT_MS, mockRunnable, true)); in testRunTimed_failed() 149 mRunUtil.runTimed(VERY_LONG_TIMEOUT_MS, mockRunnable, true)); in testRunTimed_exception() 188 CommandResult result = mRunUtil.runTimedCmd(VERY_SHORT_TIMEOUT_MS, command); in testRunTimedCmd_timeout() 282 mRunUtil.allowInterrupt(true); in testInterrupt() 284 mRunUtil.interrupt(Thread.currentThread(), message); in testInterrupt() 299 mRunUtil.allowInterrupt(false); in testInterrupt_delayed() 300 mRunUtil.interrupt(Thread.currentThread(), message); in testInterrupt_delayed() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | RunHostCommandTargetPreparerTest.java | 56 @Mock private IRunUtil mRunUtil; field in RunHostCommandTargetPreparerTest 67 return mRunUtil; in setUp() 87 when(mRunUtil.runTimedCmd(anyLong(), any())).thenReturn(result); in testSetUp() 91 verify(mRunUtil).runTimedCmd(eq(10L), eq("command"), eq("argument"), eq(DEVICE_SERIAL)); in testSetUp() 102 when(mRunUtil.runTimedCmd(anyLong(), any())).thenReturn(result); in testSetUp_withWorkDir() 106 verify(mRunUtil).setWorkingDir(any()); in testSetUp_withWorkDir() 107 verify(mRunUtil).runTimedCmd(eq(10L), eq("command")); in testSetUp_withWorkDir() 118 when(mRunUtil.runTimedCmd(anyLong(), any())).thenReturn(result); in testSetUp_withErrors() 129 when(mRunUtil.runTimedCmd(anyLong(), any())).thenReturn(result); in testTearDown() 133 verify(mRunUtil).runTimedCmd(eq(10L), eq("command"), eq("argument"), eq(DEVICE_SERIAL)); in testTearDown() [all …]
|
D | RunHostScriptTargetPreparerTest.java | 65 @Mock private IRunUtil mRunUtil; field in RunHostScriptTargetPreparerTest 79 return mRunUtil; in setUp() 101 when(mRunUtil.runTimedCmd(anyLong(), any())).thenReturn(result); in setUp() 115 verify(mRunUtil).setEnvVariable("ANDROID_SERIAL", DEVICE_SERIAL); in testSetUp() 116 verify(mRunUtil, never()).setEnvVariable(eq("PATH"), any()); // uses default PATH in testSetUp() 117 verify(mRunUtil).runTimedCmd(10L, mScriptFile.getAbsolutePath()); in testSetUp() 128 verify(mRunUtil).setWorkingDir(mWorkDir); in testSetUp_workingDir() 129 verify(mRunUtil).runTimedCmd(anyLong(), eq(mScriptFile.getAbsolutePath())); in testSetUp_workingDir() 138 verify(mRunUtil).runTimedCmd(anyLong(), eq(mScriptFile.getAbsolutePath())); in testSetUp_findFile() 151 when(mRunUtil.runTimedCmd(anyLong(), any())).thenReturn(result); in testSetUp_executionError() [all …]
|
D | PythonVirtualenvPreparerTest.java | 48 mPreparer.mRunUtil = mMockRunUtil; in setUp()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/cluster/ |
D | ClusterDeviceMonitorTest.java | 46 private IRunUtil mRunUtil = null; field in ClusterDeviceMonitorTest 56 mRunUtil = EasyMock.createMock(IRunUtil.class); in setUp() 63 return mRunUtil; in setUp() 120 mRunUtil.runTimedCmdSilently( in testGetAdditionalHostInfo() 129 EasyMock.expect(mRunUtil.runTimedCmdSilently(EasyMock.anyInt(), EasyMock.eq(KRBSTATUS_CMD))) in testGetAdditionalHostInfo() 132 EasyMock.replay(mRunUtil); in testGetAdditionalHostInfo() 139 EasyMock.verify(mRunUtil); in testGetAdditionalHostInfo() 158 mRunUtil.runTimedCmdSilently( in testGetAdditionalHostInfo_commandFailed() 169 EasyMock.expect(mRunUtil.runTimedCmdSilently(EasyMock.anyInt(), EasyMock.eq(KRBSTATUS_CMD))) in testGetAdditionalHostInfo_commandFailed() 172 EasyMock.replay(mRunUtil); in testGetAdditionalHostInfo_commandFailed() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/sandbox/ |
D | TradefedSandbox.java | 89 private IRunUtil mRunUtil; field in TradefedSandbox 126 mRunUtil.allowInterrupt(true); in run() 131 mRunUtil.runTimedCmd( in run() 238 mRunUtil = createRunUtil(); in prepareEnvironment() 239 mRunUtil.unsetEnvVariable(GlobalConfiguration.GLOBAL_CONFIG_VARIABLE); in prepareEnvironment() 240 mRunUtil.unsetEnvVariable(GlobalConfiguration.GLOBAL_CONFIG_SERVER_CONFIG_VARIABLE); in prepareEnvironment() 243 mRunUtil.setEnvVariable(TradefedSandboxRunner.DEBUG_THREAD_KEY, "true"); in prepareEnvironment() 247 mRunUtil.setEnvVariable(envEntry.getKey(), envEntry.getValue()); in prepareEnvironment() 372 createClasspath(mRootFolder), mRunUtil, args, mode, mGlobalConfig); in prepareConfiguration() 394 mRunUtil, in prepareConfiguration()
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/ |
D | SubprocessTfLauncher.java | 171 protected IRunUtil mRunUtil = new RunUtil(); field in SubprocessTfLauncher 208 mRunUtil = runUtil; in setRunUtil() 213 return mRunUtil; in getRunUtil() 270 mRunUtil.unsetEnvVariable(GlobalConfiguration.GLOBAL_CONFIG_VARIABLE); in preRun() 271 mRunUtil.unsetEnvVariable(GlobalConfiguration.GLOBAL_CONFIG_SERVER_CONFIG_VARIABLE); in preRun() 272 mRunUtil.unsetEnvVariable(ANDROID_SERIAL_VAR); in preRun() 289 mRunUtil.setEnvVariablePriority(EnvPriority.SET); in preRun() 290 mRunUtil.setEnvVariable(GlobalConfiguration.GLOBAL_CONFIG_VARIABLE, mGlobalConfig); in preRun() 372 CommandResult result = mRunUtil.runTimedCmd(mMaxTfRunTime, stdout, in run()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | FastbootHelper.java | 40 private IRunUtil mRunUtil; field in FastbootHelper 55 mRunUtil = runUtil; in FastbootHelper() 65 CommandResult fastbootResult = mRunUtil.runTimedCmdSilently(15000, mFastbootPath, "help"); in isFastbootAvailable() 87 mRunUtil.runTimedCmdSilently(FASTBOOT_CMD_TIMEOUT, mFastbootPath, "devices"); in getDevices() 106 mRunUtil.runTimedCmdSilently(FASTBOOT_CMD_TIMEOUT, mFastbootPath, "devices"); in getBootloaderAndFastbootdDevices() 157 final CommandResult fastbootResult = mRunUtil.runTimedCmd(FASTBOOT_CMD_TIMEOUT, in executeCommand() 170 mRunUtil.runTimedCmd( in isFastbootd()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | PythonVirtualenvPreparer.java | 57 IRunUtil mRunUtil = new RunUtil(); field in PythonVirtualenvPreparer 74 CommandResult c = mRunUtil.runTimedCmd(BASE_TIMEOUT * 5, mPip, in installDeps() 87 CommandResult c = mRunUtil.runTimedCmd(BASE_TIMEOUT * 5, mPip, in installDeps() 117 mRunUtil.runTimedCmd(BASE_TIMEOUT, "virtualenv", mVenvDir.getAbsolutePath()); in startVirtualenv() 136 mRunUtil.setWorkingDir(binDir); in activate() 138 mRunUtil.setEnvVariable(PATH, binDir + ":" + path); in activate()
|
D | RunHostScriptTargetPreparer.java | 59 private IRunUtil mRunUtil; field in RunHostScriptTargetPreparer 113 if (mRunUtil == null) { in getRunUtil() 114 mRunUtil = new RunUtil(); in getRunUtil() 116 return mRunUtil; in getRunUtil()
|
D | RunHostCommandTargetPreparer.java | 92 private IRunUtil mRunUtil; field in RunHostCommandTargetPreparer 270 if (mRunUtil == null) { in getRunUtil() 271 mRunUtil = new RunUtil(); in getRunUtil() 273 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/src/com/android/tradefed/cluster/ |
D | TestResourceDownloader.java | 38 private IRunUtil mRunUtil = null; field in TestResourceDownloader 94 if (mRunUtil == null) { in getRunUtil() 95 mRunUtil = new RunUtil(); in getRunUtil() 97 return mRunUtil; in getRunUtil()
|
D | TestOutputUploader.java | 47 private IRunUtil mRunUtil = null; field in TestOutputUploader 122 if (mRunUtil == null) { in getRunUtil() 123 mRunUtil = RunUtil.getDefault(); in getRunUtil() 125 return mRunUtil; in getRunUtil()
|
D | ClusterCommandLauncher.java | 113 private IRunUtil mRunUtil; field in ClusterCommandLauncher 353 if (mRunUtil == null) { in getRunUtil() 354 mRunUtil = new RunUtil(); in getRunUtil() 356 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/adb/ |
D | AdbStopServerPreparer.java | 62 private IRunUtil mRunUtil; field in AdbStopServerPreparer 150 if (mRunUtil == null) { in getRunUtil() 151 mRunUtil = createRunUtil(); in getRunUtil() 153 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/ |
D | PythonUnitTestRunner.java | 74 private IRunUtil mRunUtil; field in PythonUnitTestRunner 81 if (mRunUtil == null) { in getRunUtil() 82 mRunUtil = new RunUtil(); in getRunUtil() 84 return mRunUtil; in getRunUtil()
|
D | ClangCodeCoverageListener.java | 81 private IRunUtil mRunUtil; field in ClangCodeCoverageListener 91 mRunUtil = RunUtil.getDefault(); in ClangCodeCoverageListener() 101 mRunUtil = runUtil; in setRunUtil() 195 CommandResult result = mRunUtil.runTimedCmd(0, command.toArray(new String[0])); in logCoverageMeasurement()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/rust/ |
D | RustBinaryHostTest.java | 57 private IRunUtil mRunUtil; field in RustBinaryHostTest 229 if (mRunUtil == null) { in getRunUtil() 230 mRunUtil = new RunUtil(); in getRunUtil() 232 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/mobly/ |
D | MoblyBinaryHostTest.java | 115 private IRunUtil mRunUtil; field in MoblyBinaryHostTest 398 if (mRunUtil == null) { in getRunUtil() 399 mRunUtil = new RunUtil(); in getRunUtil() 401 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/python/ |
D | PythonBinaryHostTest.java | 130 private IRunUtil mRunUtil; field in PythonBinaryHostTest 403 if (mRunUtil == null) { in getRunUtil() 404 mRunUtil = new RunUtil(); in getRunUtil() 406 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | BundletoolUtil.java | 55 private IRunUtil mRunUtil; field in BundletoolUtil 59 mRunUtil = new RunUtil(); in BundletoolUtil() 202 return mRunUtil; in getRunUtil()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/device/metric/ |
D | AtraceCollector.java | 132 private IRunUtil mRunUtil = RunUtil.getDefault(); field in AtraceCollector 209 mRunUtil.runTimedCmd(mLogProcessingTimeoutMilliseconds, commandLineArr); in postProcess() 289 mRunUtil = util; in setRunUtil()
|