Home
last modified time | relevance | path

Searched refs:listener (Results 1 – 25 of 218) sorted by relevance

123456789

/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DInstrumentationTestTest.java131 Boolean answer(IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver listener) in answer() argument
172 (runner, listener) -> { in testRun()
174 listener.testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun()
175 listener.testStarted(TEST1); in testRun()
176 listener.testEnded(TEST1, EMPTY_STRING_MAP); in testRun()
177 listener.testStarted(TEST2); in testRun()
178 listener.testEnded(TEST2, EMPTY_STRING_MAP); in testRun()
179 listener.testRunEnded(1, EMPTY_STRING_MAP); in testRun()
336 (runner, listener) -> { in testRun_rerunEmpty()
337 listener.testRunStarted(TEST_PACKAGE_VALUE, 0); in testRun_rerunEmpty()
[all …]
DDeviceTestCaseTest.java115 ITestInvocationListener listener = EasyMock.createMock(ITestInvocationListener.class); in testRun_suite() local
116 listener.testRunStarted(MockTest.class.getName(), 2); in testRun_suite()
119 listener.testStarted(test1); in testRun_suite()
122 listener.testEnded(test1, TfMetricProtoUtil.upgradeConvert(metrics)); in testRun_suite()
123 listener.testStarted(test2); in testRun_suite()
124 listener.testEnded(test2, new HashMap<String, Metric>()); in testRun_suite()
125 listener.testRunEnded(EasyMock.anyLong(), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun_suite()
126 EasyMock.replay(listener); in testRun_suite()
128 test.run(mTestInfo, listener); in testRun_suite()
129 EasyMock.verify(listener); in testRun_suite()
[all …]
DInstrumentationFileTestTest.java116 IRemoteAndroidTestRunner runner, ITestRunListener listener) { in testRun_singleSuccessfulTest()
117 listener.testRunStarted(TEST_PACKAGE_VALUE, 1); in testRun_singleSuccessfulTest()
118 listener.testStarted(TestDescription.convertToIdentifier(test)); in testRun_singleSuccessfulTest()
119 listener.testEnded( in testRun_singleSuccessfulTest()
121 listener.testRunEnded(0, Collections.emptyMap()); in testRun_singleSuccessfulTest()
180 IRemoteAndroidTestRunner runner, ITestRunListener listener) { in testRun_reRunOneFailedToCompleteTest()
182 listener.testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun_reRunOneFailedToCompleteTest()
183 listener.testStarted(TestDescription.convertToIdentifier(test1)); in testRun_reRunOneFailedToCompleteTest()
184 listener.testEnded( in testRun_reRunOneFailedToCompleteTest()
186 listener.testRunEnded(1, Collections.emptyMap()); in testRun_reRunOneFailedToCompleteTest()
[all …]
DDeviceTestSuiteTest.java72 ITestInvocationListener listener = EasyMock.createMock(ITestInvocationListener.class); in testRun_suite() local
73 listener.testRunStarted(DeviceTestSuite.class.getName(), 2); in testRun_suite()
76 listener.testStarted(test1); in testRun_suite()
79 listener.testEnded(test1, TfMetricProtoUtil.upgradeConvert(metrics)); in testRun_suite()
80 listener.testStarted(test2); in testRun_suite()
81 listener.testEnded(test2, new HashMap<String, Metric>()); in testRun_suite()
82 listener.testRunEnded(EasyMock.anyLong(), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun_suite()
83 EasyMock.replay(listener); in testRun_suite()
85 suite.run(mTestInfo, listener); in testRun_suite()
86 EasyMock.verify(listener); in testRun_suite()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/
DResultForwarder.java92 for (ITestInvocationListener listener : mListeners) { in invocationStarted()
94 listener.invocationStarted(context); in invocationStarted()
98 listener.getClass().getName()); in invocationStarted()
109 for (ITestInvocationListener listener : mListeners) { in invocationFailed()
111 listener.invocationFailed(cause); in invocationFailed()
115 listener.getClass().getName()); in invocationFailed()
124 for (ITestInvocationListener listener : mListeners) { in invocationFailed()
126 listener.invocationFailed(failure); in invocationFailed()
130 listener.getClass().getName()); in invocationFailed()
158 for (ITestInvocationListener listener : mListeners) { in testLog()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/postprocessor/
DBasePostProcessorTest.java199 ITestInvocationListener listener = mProcessor.init(mMockListener); in testRunLevelPostProcessing() local
207 listener.testRunEnded(0L, initialMetrics); in testRunLevelPostProcessing()
229 LogSaverResultForwarder listener = in testRunLogsPostProcessing_processRunLogs() local
237 listener.testRunStarted("test-run", 0, 0, 0L); in testRunLogsPostProcessing_processRunLogs()
238 listener.testLog( in testRunLogsPostProcessing_processRunLogs()
242 listener.testRunEnded(0L, new HashMap<String, Metric>()); in testRunLogsPostProcessing_processRunLogs()
263 LogSaverResultForwarder listener = in testRunLevelPostProcessing_processRunLogsOnly() local
275 listener.testRunStarted("test-run", 2, 0, 0L); in testRunLevelPostProcessing_processRunLogsOnly()
276 listener.testStarted(test1); in testRunLevelPostProcessing_processRunLogsOnly()
277 listener.testLog( in testRunLevelPostProcessing_processRunLogsOnly()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/invoker/
DTestInvocation.java211 ITestInvocationListener listener, in performInvocation() argument
214 ReportHostLog reportThread = new ReportHostLog(listener, config); in performInvocation()
232 invocationPath.runDevicePreInvocationSetup(context, config, listener); in performInvocation()
236 prepareAndRun(config, testInfo, invocationPath, listener); in performInvocation()
251 reportFailure(createFailureFromException(e, FailureStatus.INFRA_FAILURE), listener); in performInvocation()
260 reportFailure(createFailureFromException(e, FailureStatus.INFRA_FAILURE), listener); in performInvocation()
272 reportFailure(createFailureFromException(e, FailureStatus.INFRA_FAILURE), listener); in performInvocation()
285 reportFailure(createFailureFromException(e, FailureStatus.UNSET), listener); in performInvocation()
291 reportFailure(createFailureFromException(e, FailureStatus.UNSET), listener); in performInvocation()
297 reportFailure(createFailureFromException(t, FailureStatus.UNSET), listener); in performInvocation()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DInstrumentationTest.java790 public void run(TestInformation testInfo, final ITestInvocationListener listener) in run() argument
816 doTestRun(testInfo, listener); in run()
878 private void doTestRun(TestInformation testInfo, ITestInvocationListener listener) in doTestRun() argument
887 Collection<TestDescription> collectedTests = collectTestsToRun(mRunner, listener); in doTestRun()
913 listener = addBugreportListenerIfEnabled(listener); in doTestRun()
914 listener = addJavaCoverageListenerIfEnabled(listener); in doTestRun()
915 listener = addGcovCoverageListenerIfEnabled(listener); in doTestRun()
916 listener = addClangCoverageListenerIfEnabled(listener); in doTestRun()
948 listener = collector.init(testInfo.getContext(), listener); in doTestRun()
960 mDevice.runInstrumentationTests(mRunner, listener); in doTestRun()
[all …]
DHostTest.java505 public void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
528 listener.testRunStarted(this.getClass().getCanonicalName(), 0); in run()
532 listener.testRunFailed(failureDescription); in run()
533 listener.testRunEnded(0L, new HashMap<String, Metric>()); in run()
540 listener = new ResultForwarder(logger, listener); in run()
543 runTestCases(listener); in run()
545 runTestClasses(listener); in run()
556 private void runTestClasses(ITestInvocationListener listener) in runTestClasses() argument
562 runRemoteTest(listener, test); in runTestClasses()
572 runJUnit3Tests(listener, junitTest, classObj.getName()); in runTestClasses()
[all …]
DGTestResultParser.java245 public GTestResultParser(String testRunName, ITestInvocationListener listener) { in GTestResultParser() argument
248 mTestListeners.add(listener); in GTestResultParser()
436 for (ITestInvocationListener listener : mTestListeners) { in reportTestRunStarted()
437 listener.testRunStarted(mTestRunName, mNumTestsExpected); in reportTestRunStarted()
448 for (ITestInvocationListener listener : mTestListeners) { in reportTestRunEnded()
449 listener.testRunEnded(mTotalRunTime, getRunMetrics()); in reportTestRunEnded()
585 for (ITestInvocationListener listener : mTestListeners) { in processTestStartedTag()
586 listener.testStarted(testId); in processTestStartedTag()
650 for (ITestInvocationListener listener : mTestListeners) { in doTestEnded()
651 listener.testFailed(testId, mCurrentTestResult.getTrace()); in doTestEnded()
[all …]
DGTestXmlResultParser.java78 public GTestXmlResultParser(String testRunName, ITestInvocationListener listener) { in GTestXmlResultParser() argument
81 if (listener != null) { in GTestXmlResultParser()
82 mTestListeners.add(listener); in GTestXmlResultParser()
100 for (ITestInvocationListener listener : mTestListeners) { in parseResult()
107 listener.testRunFailed(errorMessage); in parseResult()
108 listener.testRunEnded(mTotalRunTime, new HashMap<String, Metric>()); in parseResult()
132 for (ITestInvocationListener listener : mTestListeners) { in parseResult()
133 listener.testRunFailed( in parseResult()
138 for (ITestInvocationListener listener : mTestListeners) { in parseResult()
139 listener.testRunEnded(mTotalRunTime, new HashMap<String, Metric>()); in parseResult()
[all …]
DGTest.java169 String root, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument
177 doRunAllTestsInSubdirectory(root + "/" + child, testDevice, listener); in doRunAllTestsInSubdirectory()
181 IShellOutputReceiver resultParser = createResultParser(getFileName(root), listener); in doRunAllTestsInSubdirectory()
188 runTestXml(testDevice, root, flags, listener); in doRunAllTestsInSubdirectory()
377 ITestInvocationListener listener) in runTestXml() argument
394 GTestXmlResultParser parser = createXmlParser(testRunName, listener); in runTestXml()
414 public void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
431 listener = addNativeCoverageListenerIfEnabled(listener); in run()
432 listener = addClangCoverageListenerIfEnabled(listener); in run()
433 listener = getGTestListener(listener); in run()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/ddmlib/
DTestRunToTestInvocationForwarder.java62 public TestRunToTestInvocationForwarder(ITestLifeCycleReceiver listener) { in TestRunToTestInvocationForwarder() argument
63 this(Arrays.asList(listener)); in TestRunToTestInvocationForwarder()
73 for (ITestLifeCycleReceiver listener : mListeners) { in testStarted()
75 listener.testStarted(TestDescription.createFromTestIdentifier(testId)); in testStarted()
79 listener.getClass().getName()); in testStarted()
90 for (ITestLifeCycleReceiver listener : mListeners) { in testAssumptionFailure()
92 listener.testAssumptionFailure( in testAssumptionFailure()
97 listener.getClass().getName()); in testAssumptionFailure()
109 for (ITestLifeCycleReceiver listener : mListeners) { in testFailed()
111 listener.testFailed(TestDescription.createFromTestIdentifier(testId), trace); in testFailed()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/testtype/suite/
DModuleDefinition.java305 public final void run(TestInformation moduleInfo, ITestInvocationListener listener) in run() argument
307 run(moduleInfo, listener, null, null); in run()
321 ITestInvocationListener listener, in run() argument
325 run(moduleInfo, listener, moduleLevelListeners, failureListener, 1); in run()
341 ITestInvocationListener listener, in run() argument
395 preparationException = runTargetPreparation(moduleInfo, listener); in run()
400 preparationException = runMultiPreparerSetup(multiPreparer, moduleInfo, listener); in run()
412 reportSetupFailure(preparationException, listener, moduleLevelListeners); in run()
457 listener, in run()
467 reportSetupFailure(preparationException, listener, moduleLevelListeners); in run()
[all …]
DITestSuite.java598 public final void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
600 mCurrentLogger = listener; in run()
616 ((ITestLoggerReceiver) checker).setTestLogger(listener); in run()
666 listener.testModuleStarted(module.getModuleInvocationContext()); in run()
675 runSingleModule(module, moduleInfo, listener, moduleListeners, failureListener); in run()
681 listener.testModuleEnded(); in run()
685 moduleIsolation(mContext, listener); in run()
691 reportNotExecuted(listener, "Module did not run due to device not available."); in run()
746 ITestInvocationListener listener, in runSingleModule() argument
762 runPreModuleCheck(module.getId(), mSystemStatusCheckers, mDevice, listener); in runSingleModule() local
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DTestSuiteStub.java93 private void testAttempt(ITestInvocationListener listener) throws DeviceNotAvailableException { in testAttempt() argument
94 listener.testRunStarted(mModule, 3); in testAttempt()
96 listener.testStarted(tid); in testAttempt()
98 listener.testLog( in testAttempt()
103 listener.testEnded(tid, new HashMap<String, Metric>()); in testAttempt()
108 listener.testStarted(tid2); in testAttempt()
113 listener.testLog( in testAttempt()
118 listener.testEnded(tid2, new HashMap<String, Metric>()); in testAttempt()
122 listener.testStarted(tid3); in testAttempt()
124 listener.testFailed(tid3, "ouch this is bad."); in testAttempt()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DDynamicFileStubTest.java62 public void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
65 listener.testRunStarted(this.getClass().getName(), 1); in run()
66 checkDynamicFile(listener); in run()
67 checkDynamicFileList(listener); in run()
68 checkDynamicFileMap(listener); in run()
69 checkDynamicFileMultiMap(listener); in run()
70 listener.testRunEnded( in run()
74 private void checkDynamicFile(ITestInvocationListener listener) { in checkDynamicFile() argument
76 listener.testStarted(testId); in checkDynamicFile()
79 listener.testFailed(testId, String.format("%s doesn't exist.", mFile.getPath())); in checkDynamicFile()
[all …]
DTfTestLauncher.java199 protected void postRun(ITestInvocationListener listener, boolean exception, long elapsedTime) { in postRun() argument
200 super.postRun(listener, exception, elapsedTime); in postRun()
201 reportMetrics(elapsedTime, listener); in postRun()
211 listener.testLog("coverage_xml", LogDataType.JACOCO_XML, coverage); in postRun()
227 logHprofResults(mHprofFile, listener); in postRun()
231 testTmpDirClean(mTmpDir, listener); in postRun()
329 private void reportMetrics(long elapsedTime, ITestInvocationListener listener) { in reportMetrics() argument
333 listener.testRunStarted("elapsed-time", 1); in reportMetrics()
335 listener.testStarted(tid); in reportMetrics()
339 listener.testEnded(tid, runMetrics); in reportMetrics()
[all …]
DDeviceBatteryLevelChecker.java116 public void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
128 listener.testRunStarted("BatteryCharging", testCount); in run()
129 listener.testStarted(mTestDescription); in run()
134 charge = runTest(testInfo, listener); in run()
145 listener.testRunFailed(failure); in run()
148 listener.testEnded(mTestDescription, new HashMap<String, Metric>()); in run()
151 listener.testStarted(mChargingSpeed); in run()
156 listener.testFailed(mChargingSpeed, failure); in run()
158 listener.testIgnored(mChargingSpeed); in run()
160 checkChargingSpeed(listener, charge, elapsedTimeMs); in run()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/rust/
DRustBinaryTest.java122 String root, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument
131 if (doRunAllTestsInSubdirectory(root + "/" + child, testDevice, listener)) { in doRunAllTestsInSubdirectory()
141 runTest(testDevice, listener, createParser(listener, new File(root).getName()), root); in doRunAllTestsInSubdirectory()
156 final ITestInvocationListener listener, in runTest() argument
187 listener.testRunStarted(new File(fullPath).getName(), testCount, 0, startTimeMs); in runTest()
198 listener.testRunFailed(String.format("Device not available: %s", e.getMessage())); in runTest()
202 listener.testRunEnded(testTimeMs, new HashMap<String, Metric>()); in runTest()
205 private void wrongTestPath(String msg, String testPath, ITestInvocationListener listener) { in wrongTestPath() argument
209 listener.testRunStarted(testPath, 1, 0, startTimeMs); in wrongTestPath()
210 listener.testRunFailed(msg + testPath); in wrongTestPath()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDeviceStateMonitor.java147 IFastbootListener listener = new StubFastbootListener(); in waitForDeviceNotAvailable() local
149 mMgr.addFastbootListener(listener); in waitForDeviceNotAvailable()
153 mMgr.removeFastbootListener(listener); in waitForDeviceNotAvailable()
407 IFastbootListener listener = new StubFastbootListener(); in waitForDeviceBootloaderOrFastbootd() local
408 mMgr.addFastbootListener(listener); in waitForDeviceBootloaderOrFastbootd()
419 mMgr.removeFastbootListener(listener); in waitForDeviceBootloaderOrFastbootd()
428 IFastbootListener listener = new NotifyFastbootListener(); in waitForDeviceBootloaderStateUpdate() local
429 synchronized (listener) { in waitForDeviceBootloaderStateUpdate()
430 mMgr.addFastbootListener(listener); in waitForDeviceBootloaderStateUpdate()
432 listener.wait(); in waitForDeviceBootloaderStateUpdate()
[all …]
/tools/tradefederation/core/invocation_interfaces/com/android/tradefed/result/
DInvocationSummaryHelper.java35 for (ITestInvocationListener listener : listeners) { in reportInvocationStarted()
38 if (listener instanceof ITestSummaryListener) { in reportInvocationStarted()
39 ((ITestSummaryListener) listener).putEarlySummary(summaries); in reportInvocationStarted()
42 listener.invocationStarted(context); in reportInvocationStarted()
44 TestSummary summary = listener.getSummary(); in reportInvocationStarted()
46 summary.setSource(listener.getClass().getName()); in reportInvocationStarted()
52 log, listener.getClass().getName()); in reportInvocationStarted()
61 for (ITestInvocationListener listener : listeners) { in reportInvocationEnded()
67 if (!(listener instanceof ITestSummaryListener)) { in reportInvocationEnded()
69 listener.invocationEnded(elapsedTime); in reportInvocationEnded()
[all …]
/tools/tradefederation/contrib/src/com/android/monkey/
DMonkeyBase.java296 public void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
303 listener.testRunStarted(getClass().getCanonicalName(), 1); in run()
304 listener.testStarted(id); in run()
307 runMonkey(listener); in run()
309 listener.testEnded(id, new HashMap<String, Metric>()); in run()
310 listener.testRunEnded( in run()
328 protected void runMonkey(ITestInvocationListener listener) throws DeviceNotAvailableException { in runMonkey() argument
405 takeScreenshot(listener, "screenshot"); in runMonkey()
411 mBugreport = takeBugreport(listener, BUGREPORT_NAME); in runMonkey()
413 takeTraces(listener); in runMonkey()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/testtype/suite/retry/
DResultsPlayer.java67 public void run(TestInformation testInfo, ITestInvocationListener listener) in run() argument
98 listener.testModuleStarted(moduleContext); in run()
107 forwardTestResults(module, testSet, listener); in run()
110 listener.testModuleEnded(); in run()
165 ITestInvocationListener listener) { in forwardTestResults() argument
166 listener.testRunStarted(module.getName(), testSet.size()); in forwardTestResults()
168 listener.testStarted(testEntry.getKey(), testEntry.getValue().getStartTime()); in forwardTestResults()
171 listener.testFailed(testEntry.getKey(), testEntry.getValue().getStackTrace()); in forwardTestResults()
174 listener.testAssumptionFailure( in forwardTestResults()
178 listener.testIgnored(testEntry.getKey()); in forwardTestResults()
[all …]
/tools/tradefederation/contrib/src/com/android/performance/tests/
DEmmcPerformanceTest.java119 public void run(ITestInvocationListener listener) throws DeviceNotAvailableException { in run() argument
123 listener.testRunStarted(RUN_KEY, 5); in run()
127 runSequentialRead(mIterations, listener, metrics); in run()
128 runSequentialWrite(mIterations, listener, metrics); in run()
134 listener.testRunEnded( in run()
144 int iterations, ITestInvocationListener listener, Map<String, String> metrics) in runSequentialRead() argument
149 runTest(SEQUENTIAL_READ_KEY, command, TestType.DD, true, iterations, listener, metrics); in runSequentialRead()
154 int iterations, ITestInvocationListener listener, Map<String, String> metrics) in runSequentialWrite() argument
159 runTest(SEQUENTIAL_WRITE_KEY, command, TestType.DD, false, iterations, listener, metrics); in runSequentialWrite()
165 int iterations, ITestInvocationListener listener, Map<String, String> metrics) in runRandomRead() argument
[all …]

123456789