Home
last modified time | relevance | path

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

/tools/tradefederation/core/src/com/android/tradefed/device/cloud/
DRemoteFileUtil.java53 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 …]
DGceRemoteCmdFormatter.java92 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/
DGCSFileDownloaderFuncTest.java236 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 …]
DGCSFileDownloaderTest.java42 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()
DGCSBucketUtilFuncTest.java208 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/
DAndroidTestUtils.kt44 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/
DLocalHostResourceManager.java48 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/
DGCSFileDownloader.java178 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 …]
DGCSBucketUtil.java451 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/
DLocalFileResolver.java35 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/
DRemoteFileUtilTest.java163 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/
DTestFilePushSetup.java134 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/
DLocalHostResourceManagerTest.java52 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/
DFileDownloadCacheWrapper.java54 public boolean isFresh(File localFile, String remoteFilePath) throws BuildRetrievalError { in isFresh() argument
55 return mDelegateDownloader.isFresh(localFile, remoteFilePath); in isFresh()
DIFileDownloader.java76 public default boolean isFresh(File localFile, String remoteFilePath) in isFresh() argument
/tools/tradefederation/core/src/com/android/tradefed/host/gcs/
DGCSHostResourceManager.java62 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/
DINativeDevice.java671 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/
DContentProviderHandler.java225 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/
DArtRunTest.java707 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/
DNativeDevice.java1409 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 …]
DTestDevice.java2859 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/
DNativeDeviceTest.java345 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 …]
DTestDeviceTest.java6683 public boolean pullFile(String remoteFilePath, File localFile) in testGetBugreportz()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DZipUtil2.java47 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/
DModulePusher.java533 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()