/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | GCSFileDownloaderFuncTest.java | 199 File localFile = in testDownloadFile() local 202 String content = FileUtil.readStringFromFile(localFile); in testDownloadFile() 219 File localFile = in testDownloadFile_folder() local 222 checkDownloadedFolder(localFile); in testDownloadFile_folder() 227 File localFile = in testDownloadFile_folderNotsanitize() local 230 checkDownloadedFolder(localFile); in testDownloadFile_folderNotsanitize() 233 private void checkDownloadedFolder(File localFile) throws Exception { in checkDownloadedFolder() argument 234 Assert.assertTrue(localFile.isDirectory()); in checkDownloadedFolder() 235 Assert.assertEquals(4, localFile.list().length); in checkDownloadedFolder() 236 for (String filename : localFile.list()) { in checkDownloadedFolder() [all …]
|
D | GCSFileDownloaderTest.java | 42 void downloadFile(String bucketName, String filename, File localFile) in setUp() 45 FileUtil.writeToFile(bucketName + "\n" + filename, localFile); in setUp() 60 File localFile = null; in testDownloadFile() local 62 localFile = mGCSFileDownloader.downloadFile("gs://bucket/this/is/a/file.txt"); in testDownloadFile() 63 String content = FileUtil.readStringFromFile(localFile); in testDownloadFile() 66 FileUtil.deleteFile(localFile); in testDownloadFile()
|
D | GCSBucketUtilFuncTest.java | 208 File localFile = FileUtil.createTempFile(FILE_NAME, "", mLocalRoot); in testmd5Hash() local 209 FileUtil.writeToFile(FILE_CONTENT, localFile); in testmd5Hash() 210 Assert.assertEquals(info.mMd5Hash, mBucket.md5Hash(localFile)); in testmd5Hash()
|
/tools/tradefederation/core/src/com/android/tradefed/device/cloud/ |
D | RemoteFileUtil.java | 52 File localFile = null; in fetchRemoteFile() local 54 localFile = in fetchRemoteFile() 58 remoteInstance, options, runUtil, timeout, remoteFilePath, localFile)) { in fetchRemoteFile() 59 return localFile; in fetchRemoteFile() 64 FileUtil.deleteFile(localFile); in fetchRemoteFile() 86 File localFile) { in fetchRemoteFile() argument 94 localFile, in fetchRemoteFile() 146 File localFile = null; in fetchRemoteDir() local 148 localFile = FileUtil.createTempDir(dirName); in fetchRemoteDir() 156 localFile, in fetchRemoteDir() [all …]
|
D | GceRemoteCmdFormatter.java | 90 String localFile, in getScpCommand() argument 109 cmd.add(localFile); in getScpCommand() 111 cmd.add(localFile); in getScpCommand()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | GCSFileDownloader.java | 133 private boolean isFileFresh(File localFile, StorageObject remoteFile) throws IOException { in isFileFresh() argument 134 if (localFile == null && remoteFile == null) { in isFileFresh() 137 if (localFile == null || remoteFile == null) { in isFileFresh() 140 if (!localFile.exists()) { in isFileFresh() 143 return remoteFile.getMd5Hash().equals(FileUtil.calculateBase64Md5(localFile)); in isFileFresh() 147 public boolean isFresh(File localFile, String remotePath) throws BuildRetrievalError { in isFresh() argument 153 if (localFile == null || !localFile.exists()) { in isFresh() 160 if (!localFile.isDirectory()) { in isFresh() 161 return isFileFresh(localFile, remoteFileMeta); in isFresh() 164 return recursiveCheckFolderFreshness(bucketName, remoteFilename, localFile); in isFresh() [all …]
|
D | GCSBucketUtil.java | 451 public String md5Hash(File localFile) throws IOException { in md5Hash() argument 457 command.add(localFile.getAbsolutePath()); in md5Hash() 485 localFile.getAbsoluteFile(), in md5Hash() 508 public CommandResult pull(Path bucketPath, File localFile) throws IOException { in pull() argument 509 return copy(getUriForGcsPath(bucketPath), localFile.getPath()); in pull() 529 public CommandResult push(File localFile) throws IOException { in push() argument 530 return push(localFile, Paths.get("/")); in push() 540 public CommandResult push(File localFile, Path bucketPath) throws IOException { in push() argument 541 return copy(localFile.getAbsolutePath(), getUriForGcsPath(bucketPath)); in push() 552 File localFile = null; in pushString() local [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | NativeDevice.java | 1089 public boolean pullFile(final String remoteFilePath, final File localFile) in pullFile() argument 1095 return handler.pullFile(remoteFilePath, localFile); in pullFile() 1108 localFile.getAbsolutePath(), SyncService.getNullProgressMonitor()); in pullFile() 1112 getSerialNumber(), localFile.getAbsolutePath(), e.getMessage()); in pullFile() 1123 localFile.getAbsolutePath()), pullAction, MAX_RETRY_ATTEMPTS); in pullFile() 1131 File localFile = null; in pullFile() local 1134 localFile = FileUtil.createTempFileForRemote(remoteFilePath, null); in pullFile() 1135 if (pullFile(remoteFilePath, localFile)) { in pullFile() 1137 return localFile; in pullFile() 1144 FileUtil.deleteFile(localFile); in pullFile() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | NativeDeviceTest.java | 275 public boolean pushFile(File localFile, String remoteFilePath) in testPushDir_childFile() 295 public boolean pushFile(File localFile, String remoteFilePath) in testPushDir_childDir() 327 public boolean pushFile(File localFile, String remoteFilePath) in testPushDir_childDir_filtered() 402 public boolean pullFile(String remoteFilePath, File localFile) in testPullDir() 406 localFile.createNewFile(); in testPullDir() 471 public boolean pullFile(String remoteFilePath, File localFile) in testPullDir_pullFail() 477 localFile.createNewFile(); in testPullDir_pullFail() 1251 public boolean pullFile(String remoteFilePath, File localFile) in testGetBugreportz() 1376 File localFile = FileUtil.createTempFile("timezonetest", ".txt"); in testIsNewer() local 1378 localFile.setLastModified(1470906000000l); // Thu Aug 11 09:00:00 GMT 2016 in testIsNewer() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/cloud/ |
D | RemoteFileUtilTest.java | 158 File localFile = FileUtil.createTempDir("test-remote-push-dir"); in testPushFileToRemote() local 172 EasyMock.eq(localFile.getAbsolutePath()), in testPushFileToRemote() 186 localFile); in testPushFileToRemote() 189 FileUtil.recursiveDelete(localFile); in testPushFileToRemote() 201 File localFile = FileUtil.createTempDir("test-remote-push-dir"); in testPushFileToRemote_fail() local 215 EasyMock.eq(localFile.getAbsolutePath()), in testPushFileToRemote_fail() 229 localFile); in testPushFileToRemote_fail() 232 FileUtil.recursiveDelete(localFile); in testPushFileToRemote_fail()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | TestFilePushSetup.java | 126 File localFile = getLocalPathForFilename(buildInfo, fileName, device); in setUp() local 127 if (localFile == null) { in setUp() 142 CLog.d("Pushing file: %s -> %s", localFile.getAbsoluteFile(), remoteFileName); in setUp() 143 if (localFile.isDirectory()) { in setUp() 144 device.pushDir(localFile, remoteFileName); in setUp() 145 } else if (localFile.isFile()) { in setUp() 146 device.pushFile(localFile, remoteFileName); in setUp()
|
/tools/tradefederation/core/global_configuration/com/android/tradefed/host/ |
D | LocalHostResourceManager.java | 48 File localFile = fetchHostResource(entry.getKey(), entry.getValue()); in setup() local 49 mDownloadedHostResources.put(entry.getKey(), localFile); in setup() local 76 protected void clearHostResource(String name, File localFile) { in clearHostResource() argument 88 File localFile = new File(value); in fetchHostResource() local 89 if (!localFile.exists()) { in fetchHostResource() 92 return localFile; in fetchHostResource()
|
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/contentprovider/ |
D | ContentProviderHandler.java | 207 public boolean pullFile(String deviceFilePath, File localFile) in pullFile() argument 209 return pullFileInternal(deviceFilePath, localFile, /* currentUser */ null); in pullFile() 382 private boolean pullFileInternal(String deviceFilePath, File localFile, Integer currentUser) in pullFileInternal() argument 394 localFileStream = new FileOutputStream(localFile); in pullFileInternal() 408 deviceFilePath, localFile, stderr); in pullFileInternal()
|
/tools/tradefederation/core/src/com/android/tradefed/config/remote/ |
D | LocalFileResolver.java | 35 File localFile = new File(pathWithoutProtocol); in resolveRemoteFiles() local 36 if (localFile.exists()) { in resolveRemoteFiles() 37 return localFile; in resolveRemoteFiles() 40 String.format("Failed to find local file %s.", localFile), in resolveRemoteFiles()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/host/ |
D | LocalHostResourceManagerTest.java | 52 File localFile = FileUtil.createTempFile("filename", "apk", mLocalRoot); in testSetupHostResource() local 55 "local-hrm:host-resource", "filename-key", localFile.getAbsolutePath()); in testSetupHostResource() 59 Assert.assertEquals(localFile.getAbsolutePath(), fileResource.getAbsolutePath()); in testSetupHostResource()
|
/tools/tradefederation/core/src/com/android/tradefed/build/ |
D | FileDownloadCacheWrapper.java | 54 public boolean isFresh(File localFile, String remoteFilePath) throws BuildRetrievalError { in isFresh() argument 55 return mDelegateDownloader.isFresh(localFile, remoteFilePath); in isFresh()
|
D | IFileDownloader.java | 76 public default boolean isFresh(File localFile, String remoteFilePath) in isFresh() argument
|
/tools/tradefederation/core/src/com/android/tradefed/host/gcs/ |
D | GCSHostResourceManager.java | 62 protected void clearHostResource(String name, File localFile) { in clearHostResource() argument 63 FileUtil.recursiveDelete(localFile); in clearHostResource()
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ZipUtil2.java | 44 private static boolean applyUnixModeIfNecessary(ZipArchiveEntry entry, File localFile) in applyUnixModeIfNecessary() argument 47 Files.setPosixFilePermissions(localFile.toPath(), in applyUnixModeIfNecessary()
|
/tools/metalava/src/test/java/com/android/tools/metalava/ |
D | DriverTest.kt | 1495 val localFile = File("../../prebuilts/sdk/$apiLevel/public/android.jar") in <lambda>() constant 1496 if (localFile.exists()) { in <lambda>() 1497 return localFile in <lambda>()
|
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/ |
D | INativeDevice.java | 598 public boolean pullFile(String remoteFilePath, File localFile) in pullFile() argument 656 public boolean pushFile(File localFile, String deviceFilePath) in pushFile() argument
|