Home
last modified time | relevance | path

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

/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DGCSFileDownloaderFuncTest.java277 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FILE_NAME1); in testCheckFreshness() local
278 File localFile = mDownloader.downloadFile(remotePath); in testCheckFreshness()
279 Assert.assertTrue(mDownloader.isFresh(localFile, remotePath)); in testCheckFreshness()
284 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FILE_NAME1); in testCheckFreshness_notExist() local
285 Assert.assertFalse(mDownloader.isFresh(new File("/not/exist"), remotePath)); in testCheckFreshness_notExist()
290 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FOLDER_NAME1); in testCheckFreshness_folderNotExist() local
291 Assert.assertFalse(mDownloader.isFresh(new File("/not/exist"), remotePath)); in testCheckFreshness_folderNotExist()
296 String remotePath = String.format("gs://%s/%s/%s", BUCKET_NAME, mRemoteRoot, FILE_NAME1); in testCheckFreshness_remoteNotExist() local
298 File localFile = mDownloader.downloadFile(remotePath); in testCheckFreshness_remoteNotExist()
304 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/build/
DFileDownloadCache.java328 IFileDownloader downloader, String remotePath, File destFile) in internalfetchRemoteFile() argument
332 if (remotePath == null) { in internalfetchRemoteFile()
337 lockFile(remotePath); in internalfetchRemoteFile()
341 cachedFile = mCacheMap.remove(remotePath); in internalfetchRemoteFile()
344 String localRelativePath = convertPath(remotePath); in internalfetchRemoteFile()
347 mCacheMap.put(remotePath, cachedFile); in internalfetchRemoteFile()
355 || !downloader.isFresh(cachedFile, remotePath))) { in internalfetchRemoteFile()
360 cachedFile, remotePath)); in internalfetchRemoteFile()
370 downloadFile(downloader, remotePath, cachedFile); in internalfetchRemoteFile()
376 remotePath, cachedFile.getAbsolutePath())); in internalfetchRemoteFile()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/
DPushFilePreparer.java339 for (String remotePath : remoteToLocalMapping.keySet()) { in setUp()
340 File local = remoteToLocalMapping.get(remotePath); in setUp()
345 local.getPath(), remotePath)); in setUp()
346 evaluatePushingPair(device, testInfo.getBuildInfo(), local, remotePath); in setUp()
382 ITestDevice device, IBuildInfo buildInfo, File src, String remotePath) in evaluatePushingPair() argument
396 if (!device.doesFileExist(remotePath)) { in evaluatePushingPair()
397 device.executeShellCommand(String.format("mkdir -p \"%s\"", remotePath)); in evaluatePushingPair()
399 } else if (!device.isDirectory(remotePath)) { in evaluatePushingPair()
404 src.getAbsolutePath(), remotePath), in evaluatePushingPair()
414 if (!device.pushDir(src, remotePath, filter)) { in evaluatePushingPair()
[all …]
/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/tombstones"; in testFetchRemoteDir() local
135 EasyMock.eq("root@127.0.0.1:" + remotePath), in testFetchRemoteDir()
143 fakeInfo, mOptions, mMockRunUtil, 500L, remotePath); in testFetchRemoteDir()
156 String remotePath = "/home/vsoc-01/cuttlefish_runtime/kernel.log"; in testPushFileToRemote() local
[all …]
DRemoteAndroidVirtualDeviceTest.java782 boolean fetchRemoteDir(File localDir, String remotePath) { in testGetRemoteTombstone()
/tools/tradefederation/core/tests/src/com/android/tradefed/build/
DFileDownloadCacheTest.java250 File copyFile(String remotePath, File cachedFile, File desFile) in testFetchRemoteFile_copyFailed()
255 return super.copyFile(remotePath, cachedFile, desFile); in testFetchRemoteFile_copyFailed()
349 private void assertFetchRemoteFile(String remotePath, List<String> relativePaths) in assertFetchRemoteFile() argument
351 assertFetchRemoteFile(remotePath, relativePaths, null); in assertFetchRemoteFile()
355 private void assertFetchRemoteFile(String remotePath, List<String> relativePaths, File dest) in assertFetchRemoteFile() argument
360 mCache.fetchRemoteFile(mMockDownloader, remotePath, dest); in assertFetchRemoteFile()
362 fileCopy = mCache.fetchRemoteFile(mMockDownloader, remotePath); in assertFetchRemoteFile()
365 assertNotNull(mCache.getCachedFile(remotePath)); in assertFetchRemoteFile()
395 private void setDownloadExpections(String remotePath) throws BuildRetrievalError { in setDownloadExpections() argument
396 setDownloadExpections(remotePath, null); in setDownloadExpections()
[all …]
DFileDownloadCacheFuncTest.java326 private Thread createDownloadThread(IFileDownloader downloader, String remotePath) { in createDownloadThread() argument
331 mReturnedFiles.add(mCache.fetchRemoteFile(downloader, remotePath)); in createDownloadThread()
/tools/tradefederation/core/src/com/android/tradefed/util/
DGCSFileDownloader.java128 public void downloadFile(String remotePath, File destFile) throws BuildRetrievalError { in downloadFile() argument
129 String[] pathParts = parseGcsPath(remotePath); in downloadFile()
147 public boolean isFresh(File localFile, String remotePath) throws BuildRetrievalError { in isFresh() argument
148 String[] pathParts = parseGcsPath(remotePath); in isFresh()
238 String[] parseGcsPath(String remotePath) throws BuildRetrievalError { in parseGcsPath() argument
239 if (remotePath.startsWith(GCS_APPROX_PREFIX) && !remotePath.startsWith(GCS_PREFIX)) { in parseGcsPath()
241 remotePath = remotePath.replaceAll(GCS_APPROX_PREFIX, GCS_PREFIX); in parseGcsPath()
243 Matcher m = GCS_PATH_PATTERN.matcher(remotePath); in parseGcsPath()
246 String.format("Only GCS path is supported, %s is not supported", remotePath), in parseGcsPath()
/tools/tradefederation/core/test_framework/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/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/cloud/
DRemoteAndroidVirtualDevice.java408 boolean fetchRemoteDir(File localDir, String remotePath) { in fetchRemoteDir() argument
414 remotePath, in fetchRemoteDir()
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDevice.java1587 String remotePath = String.format("%s/%s", deviceFilePath, childFile.getName()); in pushDir() local
1596 executeShellCommand(String.format("mkdir -p \"%s\"", remotePath)); in pushDir()
1597 if (!pushDir(childFile, remotePath, excludedDirectories)) { in pushDir()
1601 if (!pushFile(childFile, remotePath)) { in pushDir()