Home
last modified time | relevance | path

Searched refs:remotePath (Results 1 – 13 of 13) sorted by relevance

/tools/tradefederation/core/src/com/android/tradefed/build/
DFileDownloadCache.java242 public File fetchRemoteFile(IFileDownloader downloader, String remotePath) in fetchRemoteFile() argument
247 lockFile(remotePath); in fetchRemoteFile()
251 cachedFile = mCacheMap.remove(remotePath); in fetchRemoteFile()
254 String localRelativePath = convertPath(remotePath); in fetchRemoteFile()
257 mCacheMap.put(remotePath, cachedFile); in fetchRemoteFile()
264 && !downloader.isFresh(cachedFile, remotePath)) { in fetchRemoteFile()
269 cachedFile, remotePath)); in fetchRemoteFile()
275 downloadFile(downloader, remotePath, cachedFile); in fetchRemoteFile()
281 remotePath, cachedFile.getAbsolutePath())); in fetchRemoteFile()
283 copyFile = copyFile(remotePath, cachedFile); in fetchRemoteFile()
[all …]
DFileDownloadCacheWrapper.java48 public void downloadFile(String remotePath, File destFile) throws BuildRetrievalError { in downloadFile() argument
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DGCSFileDownloaderFuncTest.java272 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FILE_NAME1); in testCheckFreshness() local
273 File localFile = mDownloader.downloadFile(remotePath); in testCheckFreshness()
274 Assert.assertTrue(mDownloader.isFresh(localFile, remotePath)); in testCheckFreshness()
279 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FILE_NAME1); in testCheckFreshness_notExist() local
280 Assert.assertFalse(mDownloader.isFresh(new File("/not/exist"), remotePath)); in testCheckFreshness_notExist()
285 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FOLDER_NAME1); in testCheckFreshness_folderNotExist() local
286 Assert.assertFalse(mDownloader.isFresh(new File("/not/exist"), remotePath)); in testCheckFreshness_folderNotExist()
291 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FILE_NAME1); in testCheckFreshness_remoteNotExist() local
293 File localFile = mDownloader.downloadFile(remotePath); in testCheckFreshness_remoteNotExist()
299 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FOLDER_NAME1); in testCheckFreshness_remoteFolderNotExist() local
[all …]
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DPushFilePreparer.java256 String remotePath = pair[1]; in setUp() local
257 evaluatePushingPair(device, buildInfo, src, remotePath); in setUp()
261 String remotePath = mPushFileSpecs.get(src); in setUp() local
265 "Trying to push local '%s' to remote '%s'", src.getPath(), remotePath)); in setUp()
266 evaluatePushingPair(device, buildInfo, src, remotePath); in setUp()
295 private void addPushedFile(ITestDevice device, String remotePath) throws TargetSetupError { in addPushedFile() argument
296 if (mFilesPushed.contains(remotePath)) { in addPushedFile()
301 remotePath), in addPushedFile()
304 mFilesPushed.add(remotePath); in addPushedFile()
308 ITestDevice device, IBuildInfo buildInfo, File src, String remotePath) in evaluatePushingPair() argument
[all …]
DAdditionalFilesInstaller.java51 String remotePath = String.format("%s%s", DEST_PATH, file.getName()); in setUp() local
52 CLog.d("Pushing %s to %s", file.getName(), remotePath); in setUp()
53 if (!device.pushFile(file, remotePath)) { in setUp()
55 file.getName(), remotePath), device.getDeviceDescriptor()); in setUp()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/cloud/
DRemoteFileUtilTest.java56 String remotePath = "/home/vsoc-01/cuttlefish_runtime/kernel.log"; in testFetchRemoteFile() local
70 EasyMock.eq("root@127.0.0.1:" + remotePath), in testFetchRemoteFile()
78 fakeInfo, mOptions, mMockRunUtil, 500L, remotePath); in testFetchRemoteFile()
91 String remotePath = "/home/vsoc-01/cuttlefish_runtime/kernel.log"; in testFetchRemoteFile_fail() local
106 EasyMock.eq("root@127.0.0.1:" + remotePath), in testFetchRemoteFile_fail()
111 RemoteFileUtil.fetchRemoteFile(fakeInfo, mOptions, mMockRunUtil, 500L, remotePath); in testFetchRemoteFile_fail()
120 String remotePath = "/home/vsoc-01/cuttlefish_runtime/kernel.log"; in testPushFileToRemote() local
137 EasyMock.eq("root@127.0.0.1:" + remotePath))) in testPushFileToRemote()
149 remotePath, in testPushFileToRemote()
162 String remotePath = "/home/vsoc-01/cuttlefish_runtime/kernel.log"; in testPushFileToRemote_fail() local
[all …]
/tools/tradefederation/core/src/com/android/tradefed/util/statsd/
DConfigUtil.java65 String remotePath = String.format("/data/local/tmp/%s", configFile.getName()); in pushStatsConfig() local
66 if (device.pushFile(configFile, remotePath)) { in pushStatsConfig()
67 updateConfig(device, remotePath, config.getId()); in pushStatsConfig()
91 String remotePath = String.format("/data/local/tmp/%s", configFile.getName()); in pushBinaryStatsConfig() local
92 if (device.pushFile(configFile, remotePath)) { in pushBinaryStatsConfig()
95 updateConfig(device, remotePath, configId); in pushBinaryStatsConfig()
120 private static void updateConfig(ITestDevice device, String remotePath, long configId) in updateConfig() argument
127 remotePath, in updateConfig()
131 device.deleteFile(remotePath); in updateConfig()
/tools/tradefederation/core/src/com/android/tradefed/util/
DGCSFileDownloader.java125 public void downloadFile(String remotePath, File destFile) throws BuildRetrievalError { in downloadFile() argument
126 String[] pathParts = parseGcsPath(remotePath); in downloadFile()
144 public boolean isFresh(File localFile, String remotePath) throws BuildRetrievalError { in isFresh() argument
145 String[] pathParts = parseGcsPath(remotePath); in isFresh()
230 String[] parseGcsPath(String remotePath) throws BuildRetrievalError { in parseGcsPath() argument
231 if (remotePath.startsWith(GCS_APPROX_PREFIX) && !remotePath.startsWith(GCS_PREFIX)) { in parseGcsPath()
233 remotePath = remotePath.replaceAll(GCS_APPROX_PREFIX, GCS_PREFIX); in parseGcsPath()
235 Matcher m = GCS_PATH_PATTERN.matcher(remotePath); in parseGcsPath()
238 String.format("Only GCS path is supported, %s is not supported", remotePath)); in parseGcsPath()
/tools/tradefederation/core/tests/src/com/android/tradefed/build/
DFileDownloadCacheTest.java217 File copyFile(String remotePath, File cachedFile) throws BuildRetrievalError { in testFetchRemoteFile_copyFailed()
221 return super.copyFile(remotePath, cachedFile); in testFetchRemoteFile_copyFailed()
315 private void assertFetchRemoteFile(String remotePath, List<String> relativePaths) in assertFetchRemoteFile() argument
318 File fileCopy = mCache.fetchRemoteFile(mMockDownloader, remotePath); in assertFetchRemoteFile()
320 assertNotNull(mCache.getCachedFile(remotePath)); in assertFetchRemoteFile()
345 private void setDownloadExpections(String remotePath) throws BuildRetrievalError { in setDownloadExpections() argument
346 setDownloadExpections(remotePath, null); in setDownloadExpections()
351 String remotePath, List<String> relativePaths) throws BuildRetrievalError { in setDownloadExpections() argument
372 mMockDownloader.downloadFile(EasyMock.eq(remotePath), in setDownloadExpections()
DFileDownloadCacheFuncTest.java324 private Thread createDownloadThread(IFileDownloader downloader, String remotePath) { in createDownloadThread() argument
329 mReturnedFiles.add(mCache.fetchRemoteFile(downloader, remotePath)); in createDownloadThread()
/tools/tradefederation/contrib/src/com/android/graphics/tests/
DSkiaTest.java179 String remotePath = remoteFile.getPath(); in retrieveAndUploadFile() local
180 CLog.v("adb pull %s (using pullFile)", remotePath); in retrieveAndUploadFile()
181 File localFile = mDevice.pullFile(remotePath); in retrieveAndUploadFile()
186 listener.testFailed(testId, "Failed to pull " + remotePath); in retrieveAndUploadFile()
/tools/tradefederation/contrib/src/com/android/performance/tests/
DAppInstallTest.java175 String remotePath = "/data/local/tmp/" + packageFile.getName(); in installAndTime() local
176 if (!mDevice.pushFile(packageFile, remotePath)) { in installAndTime()
204 "pm install-write %s %s %s", session, "base.apk", remotePath)); in installAndTime()
228 mDevice.executeShellCommand(String.format("rm \"%s\"", remotePath)); in installAndTime()
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDevice.java1503 String remotePath = String.format("%s/%s", deviceFilePath, childFile.getName()); in pushDir() local
1512 executeShellCommand(String.format("mkdir -p \"%s\"", remotePath)); in pushDir()
1513 if (!pushDir(childFile, remotePath, excludedDirectories)) { in pushDir()
1517 if (!pushFile(childFile, remotePath)) { in pushDir()