/tools/tradefederation/core/src/com/android/tradefed/device/cloud/ |
D | RemoteFileUtil.java | 53 File localFile = null; in fetchRemoteFile() local 55 localFile = in fetchRemoteFile() 59 remoteInstance, options, runUtil, timeout, remoteFilePath, localFile)) { in fetchRemoteFile() 60 return localFile; in fetchRemoteFile() 65 FileUtil.deleteFile(localFile); in fetchRemoteFile() 87 File localFile) { in fetchRemoteFile() argument 95 localFile, in fetchRemoteFile() 147 File localFile = null; in fetchRemoteDir() local 149 localFile = FileUtil.createTempDir(dirName); in fetchRemoteDir() 157 localFile, in fetchRemoteDir() [all …]
|
D | GceRemoteCmdFormatter.java | 92 String localFile, in getScpCommand() argument 113 cmd.add(localFile); in getScpCommand() 115 cmd.add(localFile); in getScpCommand()
|
/tools/tradefederation/core/javatests/com/android/tradefed/util/ |
D | GCSFileDownloaderFuncTest.java | 236 File localFile = in testDownloadFile() local 239 String content = FileUtil.readStringFromFile(localFile); in testDownloadFile() 256 File localFile = in testDownloadFile_folder() local 259 checkDownloadedFolder(localFile); in testDownloadFile_folder() 264 File localFile = in testDownloadFile_folderNotsanitize() local 267 checkDownloadedFolder(localFile); in testDownloadFile_folderNotsanitize() 270 private void checkDownloadedFolder(File localFile) throws Exception { in checkDownloadedFolder() argument 271 Assert.assertTrue(localFile.isDirectory()); in checkDownloadedFolder() 272 Assert.assertEquals(5, localFile.list().length); in checkDownloadedFolder() 273 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/metalava/metalava-testing/src/main/java/com/android/tools/metalava/testing/ |
D | AndroidTestUtils.kt | 44 val localFile = metalavaDir.resolve("../../prebuilts/sdk/$apiLevel/public/android.jar") in isMetalavaRootDir() constant 45 if (localFile.exists()) { in isMetalavaRootDir() 46 return localFile in isMetalavaRootDir() 58 val localFile = metalavaDir.resolve("../../prebuilts/sdk/$apiLevel/$apiSurface/api/android.txt") in getAndroidTxt() constant 59 if (!localFile.exists()) { in getAndroidTxt() 63 return localFile in getAndroidTxt()
|
/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/src/com/android/tradefed/util/ |
D | GCSFileDownloader.java | 178 void downloadFile(String bucketName, String remoteFilename, File localFile) in downloadFile() argument 186 fetchRemoteFile(bucketName, remoteFilename, localFile); in downloadFile() 190 recursiveDownloadFolder(bucketName, remoteFilename, localFile); in downloadFile() 212 private boolean isFileFresh(File localFile, StorageObject remoteFile) { in isFileFresh() argument 213 if (localFile == null && remoteFile == null) { in isFileFresh() 216 if (localFile == null || remoteFile == null) { in isFileFresh() 219 if (!localFile.exists()) { in isFileFresh() 222 return remoteFile.getMd5Hash().equals(FileUtil.calculateBase64Md5(localFile)); in isFileFresh() 226 public boolean isFresh(File localFile, String remotePath) throws BuildRetrievalError { in isFresh() argument 231 if (localFile != null && localFile.exists()) { 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/config/remote/ |
D | LocalFileResolver.java | 35 File localFile = new File(pathWithoutProtocol); in resolveRemoteFile() local 36 if (localFile.exists()) { in resolveRemoteFile() 37 return new ResolvedFile(localFile).cleanUp(false); in resolveRemoteFile() 40 String.format("Failed to find local file %s.", localFile), in resolveRemoteFile()
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/cloud/ |
D | RemoteFileUtilTest.java | 163 File localFile = FileUtil.createTempDir("test-remote-push-dir"); in testPushFileToRemote() local 178 Mockito.eq(localFile.getAbsolutePath()), in testPushFileToRemote() 191 localFile); in testPushFileToRemote() 194 FileUtil.recursiveDelete(localFile); in testPushFileToRemote() 205 File localFile = FileUtil.createTempDir("test-remote-push-dir"); in testPushFileToRemote_fail() local 220 Mockito.eq(localFile.getAbsolutePath()), in testPushFileToRemote_fail() 233 localFile); in testPushFileToRemote_fail() 236 FileUtil.recursiveDelete(localFile); in testPushFileToRemote_fail() 257 File localFile = FileUtil.createTempDir("test-remote-push-dir"); in testPushFileToRemoteOxygenation() local 270 localFile); in testPushFileToRemoteOxygenation() [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | TestFilePushSetup.java | 134 File localFile = getLocalPathForFilename(buildInfo, fileName, device); in setUp() local 135 if (localFile == null) { in setUp() 153 CLog.d("Pushing file: %s -> %s", localFile.getAbsoluteFile(), remoteFileName); in setUp() 154 if (localFile.isDirectory()) { in setUp() 155 device.pushDir(localFile, remoteFileName); in setUp() 156 } else if (localFile.isFile()) { in setUp() 157 device.pushFile(localFile, remoteFileName); in setUp()
|
/tools/tradefederation/core/javatests/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/device_build_interfaces/com/android/tradefed/device/ |
D | INativeDevice.java | 671 public boolean pullFile(String remoteFilePath, File localFile) in pullFile() argument 685 public boolean pullFile(String remoteFilePath, File localFile, int userId) in pullFile() argument 769 public boolean pushFile(File localFile, String deviceFilePath) in pushFile() argument 782 public boolean pushFile(File localFile, String deviceFilePath, int userId) in pushFile() argument 797 final File localFile, in pushFile() argument
|
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/contentprovider/ |
D | ContentProviderHandler.java | 225 public boolean pullFile(String deviceFilePath, File localFile) in pullFile() argument 227 return pullFileInternal(deviceFilePath, localFile, getEffectiveUserId()); in pullFile() 443 private boolean pullFileInternal(String deviceFilePath, File localFile, int userId) in pullFileInternal() argument 451 localFileStream = new FileOutputStream(localFile); in pullFileInternal() 465 deviceFilePath, localFile, stderr); in pullFileInternal()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/ |
D | ArtRunTest.java | 707 private boolean pullAndCheckFile(String remoteFilePath, File localFile) in pullAndCheckFile() argument 728 boolean result = mDevice.pullFile(remoteFilePath, localFile); in pullAndCheckFile() 731 long localFileSize = localFile.length(); in pullAndCheckFile() 732 CLog.d("Size of local file `%s` is %d bytes", localFile, localFileSize); in pullAndCheckFile() 735 String localMd5Digest = FileUtil.calculateMd5(localFile); in pullAndCheckFile() 736 CLog.d("MD5 digest of local file `%s` is %s", localFile, localMd5Digest); in pullAndCheckFile() 744 localFile, remoteFilePath, localFileSize, remoteFileSize); in pullAndCheckFile() 755 localFile, remoteFilePath, localMd5Digest, remoteMd5Digest); in pullAndCheckFile()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | NativeDevice.java | 1409 public boolean pullFile(final String remoteFilePath, final File localFile, int userId) in pullFile() argument 1418 return handler.pullFile(remoteFilePath, localFile); in pullFile() 1421 return pullFileInternal(remoteFilePath, localFile); in pullFile() 1431 public boolean pullFile(final String remoteFilePath, final File localFile) in pullFile() argument 1433 return pullFile(remoteFilePath, localFile, getCurrentUserCompatible()); in pullFile() 1439 File localFile = null; in pullFile() local 1442 localFile = FileUtil.createTempFileForRemote(remoteFilePath, null); in pullFile() 1443 if (pullFile(remoteFilePath, localFile, userId)) { in pullFile() 1445 return localFile; in pullFile() 1452 FileUtil.deleteFile(localFile); in pullFile() [all …]
|
D | TestDevice.java | 2859 for (File localFile : builder.mBootFiles.keySet()) { in startMicrodroid() 2860 String remoteFileName = builder.mBootFiles.get(localFile); in startMicrodroid() 2861 pushFile(localFile, TEST_ROOT + remoteFileName); in startMicrodroid() 3378 public MicrodroidBuilder addBootFile(File localFile, String remoteFileName) { in addBootFile() argument 3379 mBootFiles.put(localFile, remoteFileName); in addBootFile()
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/ |
D | NativeDeviceTest.java | 345 File localFile, in testPushDir_childFile() 371 public boolean pushFile(File localFile, String remoteFilePath) in testPushDir_childDir() 403 public boolean pushFile(File localFile, String remoteFilePath) in testPushDir_childDir_filtered() 521 protected boolean pullFileInternal(String remoteFilePath, File localFile) in testPullDir() 525 localFile.createNewFile(); in testPullDir() 593 protected boolean pullFileInternal(String remoteFilePath, File localFile) in testPullDir_pullFail() 599 localFile.createNewFile(); in testPullDir_pullFail() 1251 File localFile = FileUtil.createTempFile("timezonetest", ".txt"); in testIsNewer() local 1253 localFile.setLastModified(1470906000000L); // Thu Aug 11 09:00:00 GMT 2016 in testIsNewer() 1258 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer() [all …]
|
D | TestDeviceTest.java | 6683 public boolean pullFile(String remoteFilePath, File localFile) in testGetBugreportz()
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ZipUtil2.java | 47 private static boolean applyUnixModeIfNecessary(ZipArchiveEntry entry, File localFile) in applyUnixModeIfNecessary() argument 50 Files.setPosixFilePermissions(localFile.toPath(), in applyUnixModeIfNecessary()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | ModulePusher.java | 533 ITestDevice device, File localFile, String filePathOnDevice, boolean isDir) in pushPackageToDevice() argument 537 ? device.pushDir(localFile, filePathOnDevice) in pushPackageToDevice() 538 : device.pushFile(localFile, filePathOnDevice); in pushPackageToDevice() 543 localFile.getName(), filePathOnDevice); in pushPackageToDevice() 548 localFile, filePathOnDevice, device.getSerialNumber()), in pushPackageToDevice()
|