Home
last modified time | relevance | path

Searched refs:devicePath (Results 1 – 15 of 15) sorted by relevance

/tools/tradefederation/core/javatests/com/android/tradefed/device/contentprovider/
DContentProviderHandlerTest.java128 String devicePath = "path/somewhere/file.txt"; in testDeleteFile() local
137 devicePath))); in testDeleteFile()
138 assertTrue(mProvider.deleteFile(devicePath)); in testDeleteFile()
144 String devicePath = "path/somewhere/file.txt"; in testDeleteFile_fail() local
156 devicePath))); in testDeleteFile_fail()
157 assertFalse(mProvider.deleteFile(devicePath)); in testDeleteFile_fail()
163 String devicePath = "path/somewhere/file.txt"; in testError() local
174 devicePath))); in testError()
175 assertFalse(mProvider.deleteFile(devicePath)); in testError()
183 String devicePath = "path/somewhere/file.txt"; in testPushFile() local
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/device/
DTestDeviceShellFuncTest.java61 String devicePath = null; in testExecuteShellCommand_basic() local
65 devicePath = String.format("%s/%s", mInternalStorage, testTag); in testExecuteShellCommand_basic()
69 mTestDevice.pushString(contents, devicePath); in testExecuteShellCommand_basic()
73 assumeTrue(mTestDevice.doesFileExist(devicePath)); in testExecuteShellCommand_basic()
76 String output = mTestDevice.executeShellCommand(String.format("ls %s", devicePath)); in testExecuteShellCommand_basic()
79 assertEquals(devicePath.trim(), output.trim()); in testExecuteShellCommand_basic()
83 mTestDevice.executeShellCommand(String.format("cat %s", devicePath)); in testExecuteShellCommand_basic()
88 if (devicePath != null) { in testExecuteShellCommand_basic()
89 mTestDevice.deleteFile(devicePath); in testExecuteShellCommand_basic()
102 String devicePath = null; in testExecuteShellCommandV2_basic() local
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/
DPushFileInvoker.java60 String devicePath = String.format("/data/%s", file); in setUp() local
61 if (!device.doesFileExist(devicePath)) { in setUp()
62 CLog.w("Ignoring non-existent path %s", devicePath); in setUp()
65 if (device.isDirectory(devicePath)) { in setUp()
66 CLog.w("%s is a directory, skipping", devicePath); in setUp()
70 device.executeShellCommand(String.format("chmod 755 %s", devicePath)); in setUp()
73 devicePath = String.format("su root %s", devicePath); in setUp()
76 device.executeShellCommand(devicePath, receiver, in setUp()
DPushFilePreparer.java424 for (String devicePath : mFilesPushed) { in tearDown()
425 device.deleteFile(devicePath); in tearDown()
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
DCodeCoverageCollector.java321 for (String devicePath : Splitter.on('\n').omitEmptyStrings().split(fileList)) { in cleanUpDeviceCoverageFiles()
322 if (devicePath.endsWith(".mm.ec")) { in cleanUpDeviceCoverageFiles()
325 int start = devicePath.indexOf('-') + 1; in cleanUpDeviceCoverageFiles()
326 int end = devicePath.indexOf('.'); in cleanUpDeviceCoverageFiles()
327 int pid = Integer.parseInt(devicePath.substring(start, end)); in cleanUpDeviceCoverageFiles()
329 device.deleteFile(devicePath); in cleanUpDeviceCoverageFiles()
332 device.deleteFile(devicePath); in cleanUpDeviceCoverageFiles()
402 for (String devicePath : mConfiguration.getCoverageOptions().getDeviceCoveragePaths()) { in logNativeCoverageMeasurement()
411 ZIP_CLANG_FILES_COMMAND_FORMAT, devicePath), // Command in logNativeCoverageMeasurement()
420 untarDirs.put(devicePath, untarDir); in logNativeCoverageMeasurement()
[all …]
DJavaCodeCoverageCollector.java258 for (String devicePath : Splitter.on('\n').omitEmptyStrings().split(fileList)) { in cleanUpDeviceCoverageFiles()
259 if (devicePath.endsWith(".mm.ec")) { in cleanUpDeviceCoverageFiles()
262 int start = devicePath.indexOf('-') + 1; in cleanUpDeviceCoverageFiles()
263 int end = devicePath.indexOf('.'); in cleanUpDeviceCoverageFiles()
264 int pid = Integer.parseInt(devicePath.substring(start, end)); in cleanUpDeviceCoverageFiles()
266 device.deleteFile(devicePath); in cleanUpDeviceCoverageFiles()
269 device.deleteFile(devicePath); in cleanUpDeviceCoverageFiles()
DClangCodeCoverageCollector.java164 for (String devicePath : mConfiguration.getCoverageOptions().getDeviceCoveragePaths()) { in logCoverageMeasurement()
173 ZIP_CLANG_FILES_COMMAND_FORMAT, devicePath), // Command in logCoverageMeasurement()
182 untarDirs.put(devicePath, untarDir); in logCoverageMeasurement()
188 CLog.e("Failed to pull Clang coverage data from %s", devicePath); in logCoverageMeasurement()
215 for (String devicePath : mConfiguration.getCoverageOptions().getDeviceCoveragePaths()) { in logCoverageMeasurement()
217 String.format(DELETE_COVERAGE_FILES_COMMAND_FORMAT, devicePath)); in logCoverageMeasurement()
/tools/tradefederation/core/util_apps/ContentProvider/hostsidetests/src/com/android/tradefed/contentprovider/
DContentProviderTest.java99 String devicePath = "/sdcard/" + tmpFile.getName(); in testPushFile() local
100 mToBeDeleted.add(devicePath); in testPushFile()
101 boolean res = mHandler.pushFile(tmpFile, devicePath); in testPushFile()
114 String devicePath = "/sdcard/" + tmpFile.getName(); in testDeleteFile() local
116 boolean res = mHandler.pushFile(tmpFile, devicePath); in testDeleteFile()
120 assertTrue(mHandler.deleteFile(devicePath)); in testDeleteFile()
/tools/tradefederation/core/src/com/android/tradefed/util/
DNativeCodeCoverageFlusher.java76 for (String devicePath : mCoverageOptions.getDeviceCoveragePaths()) { in deleteCoverageMeasurements()
78 String.format(CLEAR_CLANG_COVERAGE_FILES_FORMAT, devicePath)); in deleteCoverageMeasurements()
80 String.format(CLEAR_GCOV_COVERAGE_FILES_FORMAT, devicePath)); in deleteCoverageMeasurements()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DGTest.java316 String devicePath = "/data/local/tmp/" + flagFile.getName(); in createFlagFile() local
318 if (!mDevice.pushFile(flagFile, devicePath)) { in createFlagFile()
325 return devicePath; in createFlagFile()
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/
DJavaCodeCoverageCollectorTest.java528 private void mockCoverageFileOnDevice(String devicePath) in mockCoverageFileOnDevice() argument
530 File coverageFile = folder.newFile(new File(devicePath).getName()); in mockCoverageFileOnDevice()
536 doReturn(coverageFile).when(mMockDevice).pullFile(devicePath); in mockCoverageFileOnDevice()
595 private static HashMap<String, Metric> createMetricsWithCoverageMeasurement(String devicePath) { in createMetricsWithCoverageMeasurement() argument
596 return TfMetricProtoUtil.upgradeConvert(ImmutableMap.of("coverageFilePath", devicePath)); in createMetricsWithCoverageMeasurement()
DCodeCoverageCollectorTest.java766 private void mockCoverageFileOnDevice(String devicePath) in mockCoverageFileOnDevice() argument
768 File coverageFile = folder.newFile(new File(devicePath).getName()); in mockCoverageFileOnDevice()
774 doReturn(coverageFile).when(mMockDevice).pullFile(devicePath); in mockCoverageFileOnDevice()
838 private static HashMap<String, Metric> createMetricsWithCoverageMeasurement(String devicePath) { in createMetricsWithCoverageMeasurement() argument
839 return TfMetricProtoUtil.upgradeConvert(ImmutableMap.of("coverageFilePath", devicePath)); in createMetricsWithCoverageMeasurement()
/tools/tradefederation/core/src/com/android/tradefed/device/
DTestDevice.java2541 public File dumpHeap(String process, String devicePath) throws DeviceNotAvailableException { in dumpHeap() argument
2542 if (Strings.isNullOrEmpty(devicePath) || Strings.isNullOrEmpty(process)) { in dumpHeap()
2549 File dump = dumpAndPullHeap(pid, devicePath); in dumpHeap()
2551 deleteFile(devicePath); in dumpHeap()
2556 private File dumpAndPullHeap(String pid, String devicePath) throws DeviceNotAvailableException { in dumpAndPullHeap() argument
2557 executeShellCommand(String.format(DUMPHEAP_CMD, pid, devicePath)); in dumpAndPullHeap()
2561 while (!doesFileExist(devicePath) && attempt < 3) { in dumpAndPullHeap()
2565 File dumpFile = pullFile(devicePath); in dumpAndPullHeap()
DNativeDevice.java5178 private int getCurrentUserCompatible(String devicePath) throws DeviceNotAvailableException { in getCurrentUserCompatible() argument
5179 if (!isSdcardOrEmulated(devicePath)) { in getCurrentUserCompatible()
5977 public File dumpHeap(String process, String devicePath) throws DeviceNotAvailableException { in dumpHeap() argument
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/
DITestDevice.java1097 public File dumpHeap(String process, String devicePath) throws DeviceNotAvailableException; in dumpHeap() argument