Home
last modified time | relevance | path

Searched refs:File (Results 1 – 25 of 177) sorted by relevance

12345678

/platform_testing/libraries/flicker/utils/src/android/tools/traces/io/
DIoUtils.kt21 import java.io.File
26 private fun copyFile(src: File, dst: File) { in copyFile()
31 fun moveFile(src: File, dst: File) { in moveFile()
45 fun waitFileExists(file: File, timeoutMs: Long) { in waitFileExists()
64 private fun moveDirectory(src: File, dst: File) { in moveDirectory()
DArtifactBuilder.kt29 import java.io.File in <lambda>()
43 private var outputDir: File? = null in <lambda>()
44 private var files: Map<ResultArtifactDescriptor, File> = emptyMap() in <lambda>()
49 fun withOutputDir(value: File): ArtifactBuilder = apply { outputDir = value } in <lambda>()
53 fun withFiles(value: Map<ResultArtifactDescriptor, File>): ArtifactBuilder = apply { in <lambda>()
70 private fun createArtifactFile(): File { in <lambda>()
103 private fun existsArchiveFor(outputDir: File, scenario: Scenario, counter: Int): Boolean { in <lambda>()
109 private fun addFile(zipOutputStream: ZipOutputStream, artifact: File, nameInArchive: String) { in <lambda>()
127 private fun writeToZip(file: File, files: Map<ResultArtifactDescriptor, File>) { in <lambda>()
DResultWriter.kt31 import java.io.File
37 private val files = mutableMapOf<ResultArtifactDescriptor, File>()
41 private var outputDir: File? = null
56 fun withOutputDir(dir: File) = apply { outputDir = dir } in <lambda>()
74 fun addTraceResult(traceType: TraceType, artifact: File, tag: String = Tag.ALL) = apply { in <lambda>()
/platform_testing/libraries/compatibility-common-util/src/com/android/compatibility/common/util/
DZipUtil.java21 import java.io.File;
43 public static void createZip(File dir, File zipFile) throws IOException { in createZip()
54 public static void createZip(List<File> files, File zipFile) throws IOException { in createZip()
59 for (File file : files) { in createZip()
81 public static void addToZip(ZipOutputStream out, File file, List<String> relativePathSegs) in addToZip()
96 File[] subFiles = file.listFiles(); in addToZip()
101 for (File subFile : subFiles) { in addToZip()
133 private static void writeToStream(File file, OutputStream out) throws IOException { in writeToStream()
DFileUtil.java21 import java.io.File;
37 public static void recursiveDelete(File rootDir) { in recursiveDelete()
40 File[] childFiles = rootDir.listFiles(); in recursiveDelete()
42 for (File child : childFiles) { in recursiveDelete()
57 public static void writeToFile(InputStream input, File destFile) throws IOException { in writeToFile()
DDynamicConfig.java25 import java.io.File;
54 public void initializeConfig(File file) throws XmlPullParserException, IOException { in initializeConfig()
103 public static File getConfigFile(File configFolder, String moduleName) in getConfigFile()
105 File config = getConfigFileUnchecked(configFolder, moduleName); in getConfigFile()
112 public static File getConfigFileUnchecked(File configFolder, String moduleName) { in getConfigFileUnchecked()
113 return new File(configFolder, String.format("%s.dynamic", moduleName)); in getConfigFileUnchecked()
116 public static Map<String, List<String>> createConfigMap(File file) in createConfigMap()
DScreenshotsMetadataHandler.java22 import java.io.File;
49 public static File writeResults(IInvocationResult result, File resultDir) in writeResults()
51 File screenshotsMetadataFile = new File(resultDir, SCREENSHOTS_METADATA_FILE_NAME); in writeResults()
DChecksumReporter.java27 import java.io.File;
71 public static boolean tryCreateChecksum(File dir, IInvocationResult result) { in tryCreateChecksum()
91 public static ChecksumReporter load(File directory) throws ChecksumValidationException { in load()
104 public ChecksumReporter(File directory) throws ChecksumValidationException { in ChecksumReporter()
105 File file = new File(directory, ChecksumReporter.NAME); in ChecksumReporter()
160 public void addFile(File file, String path) { in addFile()
172 public boolean containsFile(File file, String path) { in containsFile()
190 public void addDirectory(File directory) { in addDirectory()
197 private void addDirectory(File directory, String path) { in addDirectory()
199 File child = new File(directory, childName); in addDirectory()
[all …]
DIInvocationResult.java18 import java.io.File;
131 File getRetryDirectory(); in getRetryDirectory()
136 void setRetryDirectory(File resultDir); in setRetryDirectory()
/platform_testing/libraries/screenshot/deviceless/layoutlib/tests/src/com/android/ide/common/resources/deprecated/
DTestFolderWrapper.java22 import java.io.File;
30 public TestFolderWrapper(File file) { in TestFolderWrapper()
35 File[] files = listFiles(); in listMembers()
41 File f = files[i]; in listMembers()
54 return new TestFolderWrapper(new File(this, name)); in getFolder()
/platform_testing/libraries/compatibility-common-util/tests/src/com/android/compatibility/common/util/
DDynamicConfigTest.java25 import java.io.File;
91 File file = createFileFromStr(CORRECT_CONFIG); in testCorrectConfig()
106 File file = createFileFromStr(CONFIG_WRONG_NODE_NAME); in testConfigWithWrongNodeName()
117 private File createFileFromStr(String configStr) throws IOException { in createFileFromStr()
118 File file = File.createTempFile("test", "dynamic"); in createFileFromStr()
DLightInvocationResultTest.java23 import java.io.File;
30 private File resultsDir;
43 File resultDir = ResultHandlerTest.writeResultDir(resultsDir, false); in testLightInvocationResultInstatiate()
/platform_testing/libraries/timeresult-helper/src/android/support/test/timeresulthelper/
DTimeResultLogger.java19 import java.io.File;
30 public static void writeTimeStamp(String logType, String testCase, long delay, File destFile) in writeTimeStamp()
36 long delay, File destFile) throws IOException { in writeTimeStamp()
43 public static void writeTimeStampLogStart(String testCase, File destFile) throws IOException { in writeTimeStampLogStart()
47 public static void writeTimeStampLogEnd(String testCase, File destFile) throws IOException { in writeTimeStampLogEnd()
51 public static void writeResultToFile(String testCase, File destFile, Bundle result) in writeResultToFile()
/platform_testing/libraries/screenshot/deviceless/layoutlib/tests/src/com/android/layoutlib/bridge/intensive/
DRenderTestBase.java52 import java.io.File;
180 File nativeLibDir = new File(nativeLibDirPath); in getNativeLibDirPath()
228 if (platformDir != null && !platformDir.isEmpty() && new File(platformDir).isDirectory()) { in getPlatformDir()
234 platformDir = getPlatformDirFromHostOut(new File(androidHostOut)); in getPlatformDir()
240 File workingDir = new File(workingDirString); in getPlatformDir()
248 File currentDir = workingDir; in getPlatformDir()
274 private static String getPlatformDirFromRoot(File root) { in getPlatformDirFromRoot()
278 File out = new File(root, "out"); in getPlatformDirFromRoot()
282 File host = new File(out, "host"); in getPlatformDirFromRoot()
286 File[] hosts = host.listFiles(path -> path.isDirectory() && in getPlatformDirFromRoot()
[all …]
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/view/
DViewTraceMonitor.kt25 import java.io.File in <lambda>()
40 override fun doStop(): File { in <lambda>()
51 private fun dumpTraces(): File { in <lambda>()
52 val outputFileZip = File.createTempFile(traceType.fileName, "") in <lambda>()
58 private fun ResultWriter.writeTraces(viewCaptureZip: File) { in <lambda>()
68 val unzippedFile = File.createTempFile(traceType.fileName, fileName) in <lambda>()
/platform_testing/libraries/device-collectors/src/main/java/android/device/collectors/
DBaselineProfileCollector.java25 import java.io.File;
74 File outputDirectory = new File(mAdditionalTestOutputDir); in onTestRunEnd()
75 File[] baselineProfiles = in onTestRunEnd()
79 public boolean accept(File directory, String name) { in onTestRunEnd()
88 for (File baselineProfile : baselineProfiles) { in onTestRunEnd()
DScreenshotOnFailureCollector.java29 import java.io.File;
56 private File mDestDir;
123 File img = takeScreenshot(pngFileName); in onTestFail()
129 File uixFile = collectUiXml(fileName); in onTestFail()
139 public File takeScreenshot(String fileName) { in takeScreenshot()
140 File img = new File(mDestDir, fileName); in takeScreenshot()
169 public File collectUiXml(String fileName) { in collectUiXml()
170 File uixFile = new File(mDestDir, String.format("%s.uix", fileName)); in collectUiXml()
DMobilityChangeCollector.java24 import java.io.File;
42 private File mDestDir;
56 File mobilityLog = new File(mDestDir, fileName); in onTestRunEnd()
72 protected void getMobilityChangesSince(String startTime, File saveTo) in getMobilityChangesSince()
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/
DTraceMonitor.kt26 import java.io.File in <lambda>()
37 protected abstract fun doStop(): File in <lambda>()
39 protected open fun doStopTraces(): Map<TraceType, File> = mapOf(traceType to doStop()) in <lambda>()
75 private fun moveTraceFileToTmpDir(sourceFile: File): File { in <lambda>()
76 val newFile = File.createTempFile(sourceFile.name, "") in <lambda>()
124 @JvmStatic protected val TRACE_DIR = File("/data/misc/wmtrace/") in <lambda>()
DScreenRecorder.kt24 import java.io.File
31 private val outputFile: File = File.createTempFile("transition", "screen_recording"),
72 override fun doStop(): File { in doStop()
/platform_testing/libraries/health/rules/src/android/platform/test/rule/
DArtifactSaver.java31 import java.io.File;
45 public static File artifactFile(String fileName) { in artifactFile()
46 return new File( in artifactFile()
55 public static File artifactFile(Description description, String prefix, String ext) { in artifactFile()
76 final File hierarchy = artifactFile(description, "Hierarchy", "zip"); in onError()
78 final File screenshot = takeDebugScreenshot(description, device, "OnFailure"); in onError()
138 private static File takeDebugScreenshot(Description description, UiDevice device, in takeDebugScreenshot()
140 final File screenshot = artifactFile(description, prefix, "png"); in takeDebugScreenshot()
146 File screenshotFile = takeDebugScreenshot(description, getUiDevice(), prefix); in takeDebugScreenshot()
160 public static void dumpCommandOutput(String cmd, File out) { in dumpCommandOutput()
DDropCachesRule.java24 import java.io.File;
56 File outputDir = in executeDropCachesImpl()
58 File outputFile = File.createTempFile("drop_cache_script", ".sh", outputDir); in executeDropCachesImpl()
/platform_testing/libraries/flicker/src/android/tools/flicker/legacy/
DFlickerBuilder.kt28 import java.io.File
34 private val outputDir: File = getDefaultFlickerOutputDir(),
78 val wmTrace: File,
79 val perfetto: File,
80 val wmTransitions: File,
81 val shellTransitions: File,
82 val eventLog: File
/platform_testing/libraries/screenshot/deviceless/layoutlib/tests/src/com/android/layoutlib/bridge/intensive/util/
DImageUtils.java24 import java.io.File;
31 import static java.io.File.separatorChar;
170 File output = new File(getFailureDir(), "delta-" + imageName); in assertImageSimilar()
189 private static File getFailureDir() { in getFailureDir()
190 File failureDir; in getFailureDir()
193 failureDir = new File(failureDirString); in getFailureDir()
196 failureDir = new File(workingDirString, "out/failures"); in getFailureDir()
210 File output = new File(getFailureDir(), getName(relativePath)); in saveImageAndAppendMessage()
DTestAssetRepository.java23 import java.io.File;
40 File asset = new File(path); in open()

12345678