Home
last modified time | relevance | path

Searched refs:mListener (Results 1 – 25 of 52) sorted by relevance

123

/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DHostTestTest.java80 private ITestInvocationListener mListener; field in HostTestTest
533 mListener = EasyMock.createMock(ITestInvocationListener.class);
551 mListener.testRunStarted((String)EasyMock.anyObject(), EasyMock.eq(2));
552 mListener.testStarted(EasyMock.eq(test1));
553 mListener.testEnded(EasyMock.eq(test1), (HashMap<String, Metric>) EasyMock.anyObject());
554 mListener.testStarted(EasyMock.eq(test2));
555 mListener.testEnded(EasyMock.eq(test2), (HashMap<String, Metric>) EasyMock.anyObject());
556 mListener.testRunEnded(EasyMock.anyLong(), (HashMap<String, Metric>) EasyMock.anyObject());
557 EasyMock.replay(mListener);
558 mHostTest.run(mListener);
[all …]
DFakeTestTest.java44 private ITestInvocationListener mListener = null; field in FakeTestTest
53 mListener = EasyMock.createStrictMock(ITestInvocationListener.class); in setUp()
146 mListener.testRunStarted(EasyMock.eq(name), EasyMock.eq(0)); in testRun_empty()
147 mListener.testRunEnded(EasyMock.eq(0l), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun_empty()
149 EasyMock.replay(mListener); in testRun_empty()
151 mTest.run(mListener); in testRun_empty()
152 EasyMock.verify(mListener); in testRun_empty()
158 mListener.testRunStarted(EasyMock.eq(name), EasyMock.eq(1)); in testRun_simplePass()
159 testPassExpectations(mListener, name, 1); in testRun_simplePass()
160 mListener.testRunEnded(EasyMock.eq(0l), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun_simplePass()
[all …]
DDeviceSuiteTest.java50 private ITestInvocationListener mListener; field in DeviceSuiteTest
58 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
164 mListener.testRunStarted( in testRunDeviceSuite()
171 mListener.testStarted(EasyMock.eq(test1)); in testRunDeviceSuite()
172 mListener.testEnded(EasyMock.eq(test1), EasyMock.eq(new HashMap<String, Metric>())); in testRunDeviceSuite()
173 mListener.testStarted(EasyMock.eq(test2)); in testRunDeviceSuite()
174 mListener.testEnded(EasyMock.eq(test2), EasyMock.eq(new HashMap<String, Metric>())); in testRunDeviceSuite()
175 mListener.testRunEnded(EasyMock.anyLong(), EasyMock.eq(new HashMap<String, Metric>())); in testRunDeviceSuite()
176 EasyMock.replay(mListener, mMockDevice); in testRunDeviceSuite()
177 mHostTest.run(mListener); in testRunDeviceSuite()
[all …]
DJarHostTestTest.java62 private ITestInvocationListener mListener; field in JarHostTestTest
80 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
267 mListener.testRunStarted(HostTest.class.getName(), 0); in testCountTestFails()
268 mListener.testRunFailed( in testCountTestFails()
270 mListener.testRunEnded(0L, new HashMap<String, Metric>()); in testCountTestFails()
272 EasyMock.replay(mListener); in testCountTestFails()
274 mTest.run(mListener); in testCountTestFails()
283 EasyMock.verify(mListener); in testCountTestFails()
291 mListener.testRunStarted(EasyMock.anyObject(), EasyMock.eq(1)); in testJarHostMetrics()
293 mListener.testStarted(EasyMock.eq(tid)); in testJarHostMetrics()
[all …]
DNativeBenchmarkTestTest.java43 private ITestInvocationListener mListener; field in NativeBenchmarkTestTest
49 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
55 EasyMock.replay(mListener, mDevice); in replayMocks()
60 EasyMock.verify(mListener, mDevice); in verifyMocks()
68 mBenchmark.run(mListener); in testRun_noDevice()
97 mBenchmark.run(mListener); in testRun_noFileEntry()
126 mBenchmark.run(mListener); in testRun_setMaxFrequency()
146 mListener.testRunStarted(EasyMock.eq(fakeRunName), EasyMock.anyInt()); in testRun_doRunAllTestsInSubdirectory()
148 mListener.testRunEnded(EasyMock.anyLong(), (HashMap<String, Metric>) EasyMock.anyObject()); in testRun_doRunAllTestsInSubdirectory()
151 mBenchmark.run(mListener); in testRun_doRunAllTestsInSubdirectory()
DDeviceJUnit4ClassRunnerTest.java115 private ITestInvocationListener mListener;
121 mListener = EasyMock.createMock(ITestInvocationListener.class);
137 mListener.testRunStarted((String) EasyMock.anyObject(), EasyMock.eq(1));
138 mListener.testStarted(EasyMock.eq(test1));
139 mListener.testEnded(EasyMock.eq(test1), EasyMock.<HashMap<String, Metric>>anyObject());
140 mListener.testRunEnded(EasyMock.anyLong(), EasyMock.<HashMap<String, Metric>>anyObject());
141 EasyMock.replay(mListener);
142 mHostTest.run(mListener);
143 EasyMock.verify(mListener);
DMockInstrumentationTest.java29 private ITestInvocationListener mListener = null; field in MockInstrumentationTest
36 mListener = listener; in run()
43 return mListener; in getListener()
47 mListener = null; in clearListener()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DModuleListenerTest.java40 private ModuleListener mListener; field in ModuleListenerTest
46 mListener = new ModuleListener(mStubListener); in setUp()
53 mListener.testRunStarted("run1", numTests); in testRegularExecution()
56 mListener.testStarted(tid); in testRegularExecution()
57 mListener.testEnded(tid, new HashMap<String, Metric>()); in testRegularExecution()
59 mListener.testRunEnded(0, new HashMap<String, Metric>()); in testRegularExecution()
60 assertEquals(numTests, mListener.getNumTotalTests()); in testRegularExecution()
61 assertEquals(numTests, mListener.getNumTestsInState(TestStatus.PASSED)); in testRegularExecution()
68 mListener.testRunStarted("run1", numTests); in testRun_missingTests()
71 mListener.testStarted(tid); in testRun_missingTests()
[all …]
DITestSuiteIntegrationTest.java100 private SuiteResultReporter mListener; field in ITestSuiteIntegrationTest
153 mListener = new SuiteResultReporter(); in setUp()
228 mListener.invocationStarted(mContext); in testSimplePassRun()
229 suite.run(mListener); in testSimplePassRun()
230 mListener.invocationEnded(System.currentTimeMillis()); in testSimplePassRun()
232 assertEquals(2, mListener.getTotalModules()); in testSimplePassRun()
233 assertEquals(2, mListener.getCompleteModules()); in testSimplePassRun()
234 assertEquals(6, mListener.getTotalTests()); in testSimplePassRun()
235 assertEquals(6, mListener.getPassedTests()); in testSimplePassRun()
236 assertEquals(0, mListener.getFailedTests()); in testSimplePassRun()
[all …]
DModuleDefinitionMultiTest.java60 private ITestInvocationListener mListener; field in ModuleDefinitionMultiTest
79 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
91 EasyMock.replay(mListener, mDevice1, mDevice2, mBuildInfo1, mBuildInfo2, mMockTargetPrep); in replayMocks()
98 EasyMock.verify(mListener, mDevice1, mDevice2, mBuildInfo1, mBuildInfo2, mMockTargetPrep); in verifyMocks()
126 mListener.testRunStarted( in testCreateAndRun()
128 mListener.testRunEnded(EasyMock.anyLong(), EasyMock.<HashMap<String, Metric>>anyObject()); in testCreateAndRun()
135 mModule.run(mListener); in testCreateAndRun()
161 mListener.testRunStarted( in testPreparer_mismatch()
163 mListener.testRunEnded(EasyMock.anyLong(), EasyMock.<HashMap<String, Metric>>anyObject()); in testPreparer_mismatch()
171 mModule.run(mListener); in testPreparer_mismatch()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/junit4/
DDeviceParameterizedRunnerTest.java90 private ITestInvocationListener mListener; field in DeviceParameterizedRunnerTest
96 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
111 mListener.testRunStarted(TestJUnitParamsClass.class.getName(), 3); in testRun()
114 mListener.testStarted(test1); in testRun()
115 mListener.testEnded(test1, new HashMap<String, Metric>()); in testRun()
119 mListener.testStarted(test2_p1); in testRun()
120 mListener.testEnded(test2_p1, new HashMap<String, Metric>()); in testRun()
124 mListener.testStarted(test2_2); in testRun()
125 mListener.testEnded(test2_2, new HashMap<String, Metric>()); in testRun()
127 mListener.testRunEnded(EasyMock.anyLong(), (HashMap<String, Metric>) EasyMock.anyObject()); in testRun()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/shard/
DTestsPoolPollerTest.java58 private ITestInvocationListener mListener; field in TestsPoolPollerTest
65 mListener = Mockito.mock(ITestInvocationListener.class); in setUp()
118 poller.run(mListener); in testPollingRun()
119 Mockito.verify(mListener, Mockito.times(numTests)) in testPollingRun()
121 Mockito.verify(mListener, Mockito.times(numTests)) in testPollingRun()
149 poller.run(mListener); in testRun_runtimeException()
150 Mockito.verify(mListener, Mockito.times(numTests)) in testRun_runtimeException()
152 Mockito.verify(mListener, Mockito.times(numTests)) in testRun_runtimeException()
180 poller.run(mListener); in testRun_deviceUnresponsive()
181 Mockito.verify(mListener, Mockito.times(numTests)) in testRun_deviceUnresponsive()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/
DNameMangleListener.java28 private final ITestInvocationListener mListener; field in NameMangleListener
32 mListener = listener; in NameMangleListener()
70 mListener.testEnded(mangledTestId, testMetrics); in testEnded()
77 mListener.testFailed(mangledTestId, trace); in testFailed()
84 mListener.testAssumptionFailure(mangledTestId, trace); in testAssumptionFailure()
91 mListener.testIgnored(mangledTestId); in testIgnored()
97 mListener.testRunEnded(elapsedTime, runMetrics); in testRunEnded()
105 mListener.testRunFailed(errorMessage); in testRunFailed()
114 mListener.testRunStarted(mangledName, testCount); in testRunStarted()
122 mListener.testRunStopped(elapsedTime); in testRunStopped()
[all …]
DJUnit4ResultForwarder.java41 private ITestInvocationListener mListener; field in JUnit4ResultForwarder
45 mListener = listener; in JUnit4ResultForwarder()
54 mListener.testRunFailed(String.format("Failed with trace: %s", failure.getTrace())); in testFailure()
77 mListener.testStarted(testid); in testStarted()
100 mListener.testLog(log.mDataName, log.mDataType, log.mDataStream); in testFinished()
108 mListener.testEnded(testid, metrics); in testFinished()
121 mListener.testStarted(testid); in testIgnored()
122 mListener.testIgnored(testid); in testIgnored()
123 mListener.testEnded(testid, new HashMap<String, Metric>()); in testIgnored()
138 mListener.testAssumptionFailure(testid, StreamUtil.getStackTrace(t)); in handleFailures()
[all …]
DBugreportCollector.java193 private ITestInvocationListener mListener; field in BugreportCollector
220 mListener = listener; in BugreportCollector()
288 mListener.testLog(logName, LogDataType.BUGREPORT, bugreport); in grabBugreport()
437 mListener.testEnded(test, testMetrics); in testEnded()
446 mListener.testFailed(test, trace); in testFailed()
455 mListener.testAssumptionFailure(test, trace); in testAssumptionFailure()
464 mListener.testRunEnded(elapsedTime, runMetrics); in testRunEnded()
474 mListener.testRunFailed(errorMessage); in testRunFailed()
484 mListener.testRunStarted(runName, testCount); in testRunStarted()
494 mListener.testRunStopped(elapsedTime); in testRunStopped()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DJUnitToInvocationResultForwarderTest.java45 private ITestInvocationListener mListener; field in JUnitToInvocationResultForwarderTest
50 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
51 mForwarder = new JUnitToInvocationResultForwarder(mListener); in setUp()
76 mListener.testFailed( in testAddFailure()
79 EasyMock.replay(mListener); in testAddFailure()
83 EasyMock.verify(mListener); in testAddFailure()
90 mListener.testEnded( in testEndTest()
95 EasyMock.replay(mListener); in testEndTest()
97 EasyMock.verify(mListener); in testEndTest()
103 mListener.testStarted( in testStartTest()
[all …]
DDeviceFileReporterTest.java39 ITestInvocationListener mListener = null; field in DeviceFileReporterTest
69 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
71 new DeviceFileReporter(mDevice, mListener) { in setUp()
94 mListener.testLog(EasyMock.eq(filename), EasyMock.eq(LogDataType.UNKNOWN), in testSimple()
119 mListener.testLog(EasyMock.eq(filename), EasyMock.eq(LogDataType.UNKNOWN), in testTrim()
149 mListener.testLog( in testLine_containingSpace()
151 mListener.testLog( in testLine_containingSpace()
153 mListener.testLog( in testLine_containingSpace()
184 mListener.testLog(EasyMock.eq(filename), EasyMock.eq(LogDataType.UNKNOWN), in testLineEnding_LF()
212 mListener.testLog(EasyMock.eq(filename), EasyMock.eq(LogDataType.UNKNOWN), in testLineEnding_CRLF()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/proto/
DProtoResultParser.java51 private ITestInvocationListener mListener; field in ProtoResultParser
79 mListener = listener; in ProtoResultParser()
150 mListener.testStarted(description, timeStampToMillis(childProto.getStartTime())); in evalProto()
202 mListener.invocationStarted(receivedProto); in handleInvocationStart()
225 mListener.invocationFailed(new Throwable(trace)); in handleInvocationEnded()
237 mListener.invocationEnded(elapsedTime); in handleInvocationEnded()
267 mListener.testModuleStarted(moduleContext); in handleModuleStart()
276 mListener.testModuleEnded(); in handleModuleEnded()
297 mListener.testRunStarted( in handleTestRunStart()
307 mListener.testRunFailed(runProto.getDebugInfo().getErrorMessage()); in handleTestRunEnd()
[all …]
/tools/tradefederation/contrib/src/com/android/media/tests/
DTestRunHelper.java32 private ITestInvocationListener mListener; field in TestRunHelper
36 mListener = listener; in TestRunHelper()
46 mListener.testRunFailed(errMsg); in reportFailure()
47 mListener.testFailed(mTestId, errMsg); in reportFailure()
48 mListener.testEnded(mTestId, new HashMap<String, Metric>()); in reportFailure()
55mListener.testRunEnded(getTotalTestTime(), TfMetricProtoUtil.upgradeConvert(resultDictionary)); in endTest()
56 mListener.testEnded(mTestId, TfMetricProtoUtil.upgradeConvert(resultDictionary)); in endTest()
60 mListener.testRunStarted(mTestId.getTestName(), numberOfTests); in startTest()
61 mListener.testStarted(mTestId); in startTest()
DCameraTestBase.java240 private ITestInvocationListener mListener = null; field in CameraTestBase.AbstractCollectingListener
248 mListener = listener; in AbstractCollectingListener()
293 mListener.testEnded(test, endTime, testMetrics); in testEnded()
300 mListener.testStarted(test, startTime); in testStarted()
312 mListener.testFailed(test, trace); in testFailed()
324 handleTestRunEnded(mListener, elapsedTime, in testRunEnded()
333 mListener.testRunStarted(runName, testCount); in testRunStarted()
339 mListener.testRunStopped(elapsedTime); in testRunStopped()
345 mListener.testLog(dataName, dataType, dataStream); in testLog()
367 mListener.testLog(logName, LogDataType.TEXT, outputSource); in stopDumping()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/util/
DSubprocessTestResultsParser.java69 private ITestInvocationListener mListener; field in SubprocessTestResultsParser
230 mListener = listener; in SubprocessTestResultsParser()
342 mListener.testRunStarted(rsi.mRunName, rsi.mTestCount, rsi.mAttempt); in handleEvent()
344 mListener.testRunStarted(rsi.mRunName, rsi.mTestCount); in handleEvent()
353 mListener.testRunFailed(rfi.mReason); in handleEvent()
363 mListener.testRunEnded( in handleEvent()
376 mListener.invocationFailed(ifi.mCause); in handleEvent()
386 mListener.testStarted(mCurrentTest, bti.mStartTime); in handleEvent()
388 mListener.testStarted(mCurrentTest); in handleEvent()
398 mListener.testFailed(mCurrentTest, fti.mTrace); in handleEvent()
[all …]
/tools/tradefederation/contrib/tests/src/com/android/continuous/
DSmokeTestTest.java29 private ITestInvocationListener mListener = null; field in SmokeTestTest
33 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
37 TrimListener trim = new TrimListener(mListener); in testRewrite()
44 mListener.testStarted(EasyMock.eq(out)); in testRewrite()
46 EasyMock.replay(mListener); in testRewrite()
48 EasyMock.verify(mListener); in testRewrite()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
DDumpHeapCollectorTest.java54 @Mock private ITestInvocationListener mListener; field in DumpHeapCollectorTest
76 .when(mListener) in setup()
113 mDumpheapCollector.init(mContext, mListener); in testCollect_success()
122 verify(mListener, times(2)) in testCollect_success()
148 mDumpheapCollector.init(mContext, mListener); in testCollectSuccess_thresholdTooHigh()
157 verify(mListener, times(0)) in testCollectSuccess_thresholdTooHigh()
169 mDumpheapCollector.init(mContext, mListener); in testCollectNoError_processNotFound()
179 verify(mListener, times(0)) in testCollectNoError_processNotFound()
DIonHeapInfoMetricCollectorTest.java50 @Mock ITestInvocationListener mListener; field in IonHeapInfoMetricCollectorTest
62 mIonHeapInfoMetricCollector.init(mContext, mListener); in setup()
65 .when(mListener) in setup()
87 verify(mListener).testLog(eq("ion-system-2"), eq(LogDataType.TEXT), any()); in testCollect()
88 verify(mListener).testLog(eq("ion-audio-1"), eq(LogDataType.TEXT), any()); in testCollect()
DRuntimeRestartCollectorTest.java104 @Mock private ITestInvocationListener mListener; field in RuntimeRestartCollectorTest
132 mCollector.init(mContext, mListener); in testStatsdInteractions_singleDevice()
168 mCollector.init(mContext, mListener); in testStatsdInteractions_multiDevice()
210 mCollector.init(mContext, mListener); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart()
253 mCollector.init(mContext, mListener); in testAddingMetrics_noRuntimeRestart_withPriorRuntimeRestart()
295 mCollector.init(mContext, mListener); in testAddingMetrics_withRuntimeRestart_noPriorRuntimeRestart()
355 mCollector.init(mContext, mListener); in testAddingMetrics_withRuntimeRestart_withPriorRuntimeRestart()
420 mCollector.init(mContext, mListener); in testAddingMetrics_withRuntimeRestart_reportsSystemServerCrashesOnly()
467 mCollector.init(mContext, mListener); in testAddingMetrics_withRuntimeRestart_useAtomResultsForCount()
496 mCollector.init(mContext, mListener); in testAddingMetrics_includesSerialForMultipleDevices()

123