Home
last modified time | relevance | path

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

123

/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/
DCompatibilityBuildHelperTest.java21 import com.android.tradefed.util.FileUtil;
51 mRoot = FileUtil.createTempDir(ROOT_DIR_NAME); in setUp()
81 FileUtil.recursiveDelete(mRoot); in tearDown()
190 File tmpDynamicFile = FileUtil.createTempFile("cts-test-file", ".dynamic"); in testAddDynamicFiles()
191 FileUtil.writeToFile("test string", tmpDynamicFile); in testAddDynamicFiles()
210 assertEquals("test string", FileUtil.readStringFromFile(newDynamicFile)); in testAddDynamicFiles()
215 FileUtil.deleteFile(tmpDynamicFile); in testAddDynamicFiles()
223 File tmpBLFile = FileUtil.createTempFile("businesslogic-test-file", ".bl"); in testSetBusinessLogicHostFile()
224 FileUtil.writeToFile("test string", tmpBLFile); in testSetBusinessLogicHostFile()
237 assertEquals("test string", FileUtil.readStringFromFile(newBLFile)); in testSetBusinessLogicHostFile()
[all …]
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/
DPreviousSessionFileCopierTest.java26 import com.android.tradefed.util.FileUtil;
48 mCurrentDir = FileUtil.createTempDir("current-copier-tests"); in setUp()
61 mPreviousDir = FileUtil.createTempDir("previous-copier-tests"); in setUp()
69 FileUtil.recursiveDelete(mPreviousDir); in tearDown()
85 FileUtil.writeToFile("CURRENT", original); in testCopy_fileExists()
89 FileUtil.writeToFile("PREVIOUS", previous); in testCopy_fileExists()
96 assertEquals("CURRENT", FileUtil.readStringFromFile(original)); in testCopy_fileExists()
DCertificationChecksumHelperTest.java26 import com.android.tradefed.util.FileUtil;
51 mWorkingDir = FileUtil.createTempDir("certification-tests"); in setUp()
52 mFakeLogFile = FileUtil.createTempFile("fake-log-file", ".xml", mWorkingDir); in setUp()
53 FileUtil.writeToFile("Bunch of data to make the file unique", mFakeLogFile); in setUp()
58 FileUtil.recursiveDelete(mWorkingDir); in tearDown()
DPreviousResultLoaderTest.java38 import com.android.tradefed.util.FileUtil;
84 FileUtil.recursiveDelete(mRootDir); in tearDown()
165 mRootDir = FileUtil.createTempDir("cts-root-dir"); in createFakeBuild()
182 FileUtil.writeToFile(resultContent, testResult); in createFakeBuild()
/test/vts/harnesses/tradefed/tests/src/com/android/compatibility/common/tradefed/util/
DVtsRetryFilterHelperTest.java22 import com.android.tradefed.util.FileUtil;
52 mTmpDir = FileUtil.createTempDir("vts-unit-tests"); in setUp()
55 FileUtil.saveResourceFile( in setUp()
69 FileUtil.recursiveDelete(mTmpDir); in tearDown()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/
DDynamicConfigFileReaderTest.java23 import com.android.tradefed.util.FileUtil;
47 mConfigFile = FileUtil.createTempFile("temp-dynamic-config", ".xml"); in setUp()
55 FileUtil.deleteFile(mConfigFile); in tearDown()
68 FileUtil.writeToFile(content, mConfigFile); in writeDynamicConfigFile()
/test/suite_harness/common/util/tests/src/com/android/compatibility/common/util/
DLightInvocationResultTest.java19 import com.android.tradefed.util.FileUtil;
34 resultsDir = FileUtil.createTempDir("results"); in setUp()
39 FileUtil.recursiveDelete(resultsDir); in tearDown()
DDynamicConfigTest.java19 import com.android.tradefed.util.FileUtil;
100 FileUtil.deleteFile(file); in testCorrectConfig()
113 FileUtil.deleteFile(file); in testConfigWithWrongNodeName()
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/
DBusinessLogicPreparer.java39 import com.android.tradefed.util.FileUtil;
225 File hostFile = FileUtil.createTempFile(FILE_LOCATION, FILE_EXT); in setUp()
226 FileUtil.writeToFile(businessLogicString, hostFile); in setUp()
381 ediFile = FileUtil in getExtendedDeviceInfo()
383 String jsonString = FileUtil.readStringFromFile(ediFile); in getExtendedDeviceInfo()
426 return FileUtil.readStringFromFile(cachedFile); in readFromCache()
429 FileUtil.deleteFile(cachedFile); in readFromCache()
433 FileUtil.deleteFile(cachedFile); in readFromCache()
454 FileUtil.writeToFile(blString, cachedFile); in writeToCache()
501 FileUtil.deleteFile(new File(mHostFilePushed)); in tearDown()
DDynamicConfigPusher.java35 import com.android.tradefed.util.FileUtil;
220 localConfigFile = FileUtil.createTempFile(lookupName, ".dynamic"); in getLocalConfigFile()
221 FileUtil.writeToFile(dynamicFileRes, localConfigFile); in getLocalConfigFile()
223 FileUtil.deleteFile(localConfigFile); in getLocalConfigFile()
255 FileUtil.deleteFile(localConfigFile); in mergeConfigFiles()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/
DSubPlanHelperTest.java34 import com.android.tradefed.util.FileUtil;
89 mResultsDir = FileUtil.createTempDir("results"); in setUp()
90 mResultDir = FileUtil.createTempDir("12345", mResultsDir); in setUp()
91 mSubPlansDir = FileUtil.createTempDir("subplans"); in setUp()
107 FileUtil.recursiveDelete(mResultsDir); in tearDown()
110 FileUtil.recursiveDelete(mSubPlansDir); in tearDown()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/
DSubPlanTest.java20 import com.android.tradefed.util.FileUtil;
68 File subPlanFile = FileUtil.createTempFile("test-subPlan-serialization", ".txt"); in testSerialization()
76 FileUtil.deleteFile(subPlanFile); in testSerialization()
81 File planFile = FileUtil.createTempFile("test-plan-parsing", ".txt"); in testParsing()
102 FileUtil.deleteFile(planFile); in testParsing()
DJarHostTestTest.java31 import com.android.tradefed.util.FileUtil;
81 mTestDir = FileUtil.createTempDir("jarhostest"); in setUp()
91 FileUtil.recursiveDelete(mTestDir); in tearDown()
103 File jarFile = FileUtil.createTempFile("test", ".jar", parentDir); in getJarResource()
104 FileUtil.writeToFile(jarFileStream, jarFile); in getJarResource()
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/device/metric/
DVtsHalTraceCollectorTest.java25 import com.android.tradefed.util.FileUtil;
73 File traceBaseDir = FileUtil.createTempDir("vts-trace"); in testOnTestRunEnd()
110 FileUtil.recursiveDelete(traceDir); in testOnTestRunEnd()
111 FileUtil.recursiveDelete(traceBaseDir); in testOnTestRunEnd()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/
DDynamicConfigPusherTest.java33 import com.android.tradefed.util.FileUtil;
208 assertTrue(FileUtil.readStringFromFile(res).contains("<dynamicConfig>")); in testResourceRead()
210 FileUtil.deleteFile(res); in testResourceRead()
230 assertTrue(FileUtil.readStringFromFile(res).contains("<dynamicConfig>")); in testResourceRead_resourceFileName()
232 FileUtil.deleteFile(res); in testResourceRead_resourceFileName()
276 FileUtil.deleteFile(dynamicFile); in testSetUp()
/test/suite_harness/tools/cts-tradefed/tests/src/com/android/compatibility/tradefed/
DCtsTradefedTest.java22 import com.android.tradefed.util.FileUtil;
57 File root = FileUtil.createTempDir("root"); in testSuiteInfoLoad()
71 FileUtil.recursiveDelete(root); in testSuiteInfoLoad()
/test/suite_harness/tools/cts-instant-tradefed/tests/src/com/android/compatibility/tradefed/
DCtsInstantTradefedTest.java22 import com.android.tradefed.util.FileUtil;
57 File root = FileUtil.createTempDir("root"); in testSuiteInfoLoad()
71 FileUtil.recursiveDelete(root); in testSuiteInfoLoad()
/test/suite_harness/common/host-side/util/tests/src/com/android/compatibility/common/util/
DDynamicConfigHandlerTest.java19 import com.android.tradefed.util.FileUtil;
120 FileUtil.deleteFile(localConfigFile); in testDynamicConfigHandler()
121 FileUtil.recursiveDelete(mergedFile); in testDynamicConfigHandler()
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/
DTestRunHandler.java20 import com.android.tradefed.util.FileUtil;
48 String mapString = FileUtil.readStringFromFile(f); in getTestRuns()
74 FileUtil.writeToFile(mapToString(testRuns), f); in setTestRuns()
DInvocationFailureHandler.java20 import com.android.tradefed.util.FileUtil;
65 FileUtil.writeToFile(cause.toString(), f, true); in setFailed()
DResultReporter.java59 import com.android.tradefed.util.FileUtil;
494 summaryFile = FileUtil.createTempFile("summary", ".txt"); in putSummary()
495 FileUtil.writeToFile(summary.getSummary().getString(), summaryFile); in putSummary()
502 FileUtil.deleteFile(summaryFile); in putSummary()
702 FileUtil.writeToFile(stream.createInputStream(), ediFile); in testLogDeviceInfo()
944 FileUtil.writeToFile(configStream, resultFile); in copyFormattingFiles()
974 FileUtil.copyFile(srcFile, destFile); in copyDynamicConfigFiles()
982 FileUtil.deleteFile(srcFile); in copyDynamicConfigFiles()
1007 FileUtil.recursiveCopy(oldChild, newChild); in copyRetryFiles()
1009 FileUtil.copyFile(oldChild, newChild); in copyRetryFiles()
/test/suite_harness/common/host-side/util/src/com/android/compatibility/common/util/
DDeviceInfo.java26 import com.android.tradefed.util.FileUtil;
56 jsonFile = FileUtil.createTempFile(getClass().getSimpleName(), FILE_SUFFIX); in testCollectDeviceInfo()
73 FileUtil.deleteFile(jsonFile); in testCollectDeviceInfo()
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/
DPreviousSessionFileCopier.java26 import com.android.tradefed.util.FileUtil;
101 FileUtil.recursiveCopy(oldChild, newChild); in copyRetryFiles()
103 FileUtil.copyFile(oldChild, newChild); in copyRetryFiles()
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/targetprep/
DVtsPythonVirtualenvPreparerTest.java29 import com.android.tradefed.util.FileUtil;
161 File requirementFile = FileUtil.createTempFile("reqfile", ".txt"); in testInstallDeps_reqFile_success()
178 FileUtil.deleteFile(requirementFile); in testInstallDeps_reqFile_success()
215 File requirementFile = FileUtil.createTempFile("reqfile", ".txt"); in testInstallDeps_reqFile_failure()
235 FileUtil.deleteFile(requirementFile); in testInstallDeps_reqFile_failure()
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/
DCollectorUtil.java24 import com.android.tradefed.util.FileUtil;
83 FileUtil.recursiveCopy(src, dest); in pullFromHost()
85 FileUtil.recursiveDelete(src); in pullFromHost()

123