Home
last modified time | relevance | path

Searched refs:writer (Results 1 – 25 of 35) sorted by relevance

12

/platform_testing/libraries/compatibility-common-util/src/com/android/compatibility/common/util/
DMultipartForm.java135 PrintWriter writer = new PrintWriter(new OutputStreamWriter(byteOutput)); in getContentBody() local
136 writer.println(); in getContentBody()
139 writeFormField(writer, formValue.getKey(), formValue.getValue()); in getContentBody()
143 writeFormFileHeader(writer, mName, mFileName); in getContentBody()
144 writer.flush(); // Must flush here before writing to the byte stream! in getContentBody()
146 writer.println(); in getContentBody()
148 writer.append("--").append(FORM_DATA_BOUNDARY).println("--"); in getContentBody()
149 writer.flush(); in getContentBody()
150 writer.close(); in getContentBody()
154 private void writeFormField(PrintWriter writer, String name, String value) { in writeFormField() argument
[all …]
/platform_testing/libraries/flicker/utils/test/src/android/tools/io/
DResultWriterTest.kt50 val writer = in cannotWriteFileWithoutScenario() constant
52 writer.write() in cannotWriteFileWithoutScenario()
61 val writer = newTestResultWriter() in writesEmptyFile() constant
62 val result = writer.write() in writesEmptyFile()
78 val writer = in writesUndefinedFile() constant
80 val result = writer.write() in writesUndefinedFile()
88 val writer = newTestResultWriter().setRunComplete() in writesRunCompleteFile() constant
89 val result = writer.write() in writesRunCompleteFile()
97 val writer = newTestResultWriter().setRunFailed(EXPECTED_FAILURE) in writesRunFailureFile() constant
98 val result = writer.write() in writesRunFailureFile()
[all …]
DBaseResultReaderTestParseTrace.kt53 protected open fun setupWriter(writer: ResultWriter): ResultWriter { in <lambda>()
54 assetFiles.forEach { (traceType, assetFile) -> writer.addTraceResult(traceType, assetFile) } in <lambda>()
55 return writer in <lambda>()
65 val writer = setupWriter(newTestResultWriter()) in <lambda>() constant
66 val result = writer.write() in <lambda>()
82 val writer = newTestResultWriter() in <lambda>() constant
83 val result = writer.write() in <lambda>()
DResultReaderTestParseLegacyTransitions.kt49 override fun setupWriter(writer: ResultWriter): ResultWriter { in doParse()
50 return super.setupWriter(writer).also { in doParse()
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/
DNoTraceMonitor.kt31 override fun stop(writer: ResultWriter) { in stop()
32 writer.setTransitionStartTime(Timestamps.min()) in stop()
33 writer.setTransitionEndTime(Timestamps.max()) in stop()
34 this.resultSetter.invoke(writer) in stop()
DTraceMonitor.kt58 override fun stop(writer: ResultWriter) { in <lambda>()
72 artifacts.forEach { (key, value) -> writer.addTraceResult(key, value) } in <lambda>()
89 fun withTracing(writer: ResultWriter, predicate: () -> Unit) { in <lambda>()
95 this.stop(writer) in <lambda>()
107 val writer = createWriter() in <lambda>() constant
108 withTracing(writer, predicate) in <lambda>()
109 val result = writer.write() in <lambda>()
DITransitionMonitor.kt27 fun stop(writer: ResultWriter)
DMonitorUtils.kt112 val writer = in withTracing() constant
121 traceMonitors.forEach { it.stop(writer) } in withTracing()
123 return ResultReaderWithLru(writer.write(), SERVICE_TRACE_CONFIG) in withTracing()
/platform_testing/libraries/flicker/utils/test/src/android/tools/monitors/events/
DEventLogMonitorTest.kt87 val writer = newTestResultWriter() in canCaptureFocusEventLogs() constant
88 monitor.stop(writer) in canCaptureFocusEventLogs()
95 val result = writer.write() in canCaptureFocusEventLogs()
149 val writer = newTestResultWriter() in onlyCapturesLastTransition() constant
150 monitor.stop(writer) in onlyCapturesLastTransition()
151 val result = writer.write() in onlyCapturesLastTransition()
195 val writer = newTestResultWriter() in ignoreFocusRequestLogs() constant
196 monitor.stop(writer) in ignoreFocusRequestLogs()
197 val result = writer.write() in ignoreFocusRequestLogs()
242 val writer = newTestResultWriter() in savesEventLogsToFile() constant
[all …]
/platform_testing/libraries/flicker/test/src/android/tools/flicker/datastore/
DCachedResultWriterTest.kt36 val writer = newTestCachedResultWriter() in writeToStore() constant
37 val expected = writer.write() in writeToStore()
47 val writer = newTestCachedResultWriter() in writeToStoreFailsWhenWriteTwice() constant
50 writer.write() in writeToStoreFailsWhenWriteTwice()
51 writer.write() in writeToStoreFailsWhenWriteTwice()
DCachedResultReaderTest.kt41 val writer = newTestResultWriter() in readFromStore() constant
42 writer.addTraceResult(TraceType.EVENT_LOG, TestTraces.EventLog.FILE) in readFromStore()
43 val result = writer.write() in readFromStore()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/assertions/
DBaseSubjectsParserTestParse.kt51 protected open fun writeTrace(writer: ResultWriter): ResultWriter { in getTime()
52 writer.addTraceResult(traceType, assetFile) in getTime()
53 return writer in getTime()
63 val writer = writeTrace(newTestResultWriter()) in parseTraceSubject() constant
64 val result = writer.write() in parseTraceSubject()
90 val writer = newTestResultWriter() in readTraceNullWhenDoesNotExist() constant
91 val result = writer.write() in readTraceNullWhenDoesNotExist()
100 val writer = writeTrace(newTestResultWriter()) in doParseStateSubjectAndValidate() constant
101 val result = writer.write() in doParseStateSubjectAndValidate()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/legacy/runner/
DTransitionExecutionRuleTest.kt80 val writer = newTestResultWriter() in setTransitionStartAndEndTime() constant
81 val rule = createRule(listOf(runTransition), writer) in setTransitionStartAndEndTime()
83 val result = writer.write() in setTransitionStartAndEndTime()
122 val writer = newTestResultWriter() in createsValidTags() constant
123 val rule = createRule(listOf(runCreateValidTags), writer) in createsValidTags()
125 val result = writer.write() in createsValidTags()
153 val writer = newTestResultWriter() in throwErrorCreateInvalidTagWithSpace() constant
156 val rule = createRule(listOf(runInvalidTagSpace), writer) in throwErrorCreateInvalidTagWithSpace()
164 val writer = newTestResultWriter() in throwErrorCreateInvalidTagDuplicate() constant
167 val rule = createRule(listOf(runCreateValidTags, runCreateValidTags), writer) in throwErrorCreateInvalidTagDuplicate()
[all …]
/platform_testing/libraries/health/rules/src/android/platform/test/rule/
DSamplerRule.java89 private void writeSampleEverySecond(OutputStreamWriter writer) in startThread()
95 writer.write( in startThread()
100 writer.write("---------------------\r\n"); in startThread()
102 writer.write(frame.toString() + "\r\n"); in startThread()
105 writer.flush(); in startThread()
DDropCachesRule.java66 BufferedWriter writer = new BufferedWriter(new FileWriter(mDropCacheScriptPath)); in executeDropCachesImpl() local
67 writer.write(str); in executeDropCachesImpl()
68 writer.close(); in executeDropCachesImpl()
/platform_testing/libraries/collectors-helper/memory/src/com/android/helpers/
DPinnerHelper.java128 FileWriter writer = new FileWriter(new File(mTestOutputFile), true); in getMetrics() local
129 storeToFile(mTestOutputFile, pinnerOutput, writer); in getMetrics()
130 writer.close(); in getMetrics()
185 private void storeToFile(String fileName, String pinnerOutput, FileWriter writer) in storeToFile() argument
188 writer.write("Pinned files details."); in storeToFile()
189 writer.write(pinnerOutput); in storeToFile()
190 writer.write('\n'); in storeToFile()
DShowmapSnapshotHelper.java171 FileWriter writer = new FileWriter(new File(mTestOutputFile), true); in getMetrics() local
222 storeToFile(mTestOutputFile, processName, pid, showmapOutput, writer); in getMetrics()
245 writer.close(); in getMetrics()
395 BufferedWriter writer = new BufferedWriter(new FileWriter(countThreadsScriptPath)); in execCountThreads() local
396 writer.write(THREADS_EXEC_SCRIPT); in execCountThreads()
397 writer.close(); in execCountThreads()
470 FileWriter writer) throws RuntimeException { in storeToFile() argument
472 writer.write(String.format(">>> %s (%d) <<<\n", processName, pid)); in storeToFile()
473 writer.write(showmapOutput); in storeToFile()
474 writer.write('\n'); in storeToFile()
/platform_testing/libraries/flicker/src/android/tools/flicker/
DUtils.kt84 actions: (writer: ResultWriter) -> Unit in <lambda>()
86 val writer = ResultWriter().forScenario(scenario).withOutputDir(outputDir).setRunComplete() in <lambda>() constant
87 monitors.fold({ actions.invoke(writer) }) { action, monitor -> in <lambda>()
88 { monitor.withTracing(writer) { action() } } in <lambda>()
90 val result = writer.write() in <lambda>()
DFlickerServiceTracesCollector.kt55 val writer = ResultWriter().forScenario(scenario).withOutputDir(outputDir) in stop() constant
56 traceMonitors.reversed().forEach { it.stop(writer) } in stop()
58 val result = writer.write() in stop()
/platform_testing/libraries/flicker/utils/test/src/android/tools/monitors/wm/
DWindowManagerTraceMonitorTest.kt53 val writer = newTestResultWriter() in includesProtologTrace() constant
54 monitor.stop(writer) in includesProtologTrace()
55 val result = writer.write() in includesProtologTrace()
/platform_testing/libraries/collectors-helper/jank/test/src/com/android/helpers/
DBinderCollectionHelperTest.java117 BufferedWriter writer = new BufferedWriter(new FileWriter(temp)); in getBufferedReader() local
118 writer.write(fakeTrace); in getBufferedReader()
119 writer.close(); in getBufferedReader()
/platform_testing/libraries/flicker/utils/test/src/android/tools/monitors/view/
DViewTraceMonitorTest.kt59 val writer = newTestResultWriter() in captureTrace() constant
60 traceMonitor.stop(writer) in captureTrace()
61 val result = writer.write() in captureTrace()
/platform_testing/libraries/flicker/utils/test/src/android/tools/monitors/
DTraceMonitorTest.kt89 val writer = newTestResultWriter() in captureTrace() constant
90 traceMonitor.stop(writer) in captureTrace()
91 val result = writer.write() in captureTrace()
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/view/
DViewTraceMonitor.kt46 override fun stop(writer: ResultWriter) { in <lambda>()
48 writer.writeTraces(viewCaptureZip) in <lambda>()
/platform_testing/libraries/junitxml/src/com/android/junitxml/
DXmlRunListener.java142 Writer writer = null; in endTestSuite() local
144 writer = new BufferedWriter(new OutputStreamWriter(mOutputStream, "UTF8")); in endTestSuite()
149 javax.xml.transform.Result output = new StreamResult(writer); in endTestSuite()
157 if (writer != null) { in endTestSuite()
159 writer.flush(); in endTestSuite()
164 writer.close(); in endTestSuite()

12