Home
last modified time | relevance | path

Searched refs:FileUtil (Results 1 – 25 of 68) 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/targetprep/
DDeviceInteractionHelperInstallerTest.java32 import com.android.tradefed.util.FileUtil;
112 File testsDir = FileUtil.createTempDir("tests_dir"); in testNoOptionsNoDeviceProperty()
125 FileUtil.recursiveDelete(testsDir); in testNoOptionsNoDeviceProperty()
132 File testsDir = FileUtil.createTempDir("tests_dir"); in testNoOptionsEmptyDeviceProperty()
145 FileUtil.recursiveDelete(testsDir); in testNoOptionsEmptyDeviceProperty()
153 File testsDir = FileUtil.createTempDir("tests_dir"); in testNoOptionsValidDeviceProperty()
175 FileUtil.recursiveDelete(testsDir); in testNoOptionsValidDeviceProperty()
184 File testsDir = FileUtil.createTempDir("tests_dir"); in testFallbackPackageOptionOverridesDefault()
199 FileUtil.recursiveDelete(testsDir); in testFallbackPackageOptionOverridesDefault()
208 File testsDir = FileUtil.createTempDir("tests_dir"); in testDevicePropertyOptionOverridesDefault()
[all …]
DDynamicConfigPusherTest.java34 import com.android.tradefed.util.FileUtil;
215 assertTrue(FileUtil.readStringFromFile(res).contains("<dynamicConfig>")); in testResourceRead()
217 FileUtil.deleteFile(res); in testResourceRead()
237 assertTrue(FileUtil.readStringFromFile(res).contains("<dynamicConfig>")); in testResourceRead_resourceFileName()
239 FileUtil.deleteFile(res); in testResourceRead_resourceFileName()
283 FileUtil.deleteFile(dynamicFile); in testSetUp()
/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()
DCertificationSuiteResultReporterTest.java29 import com.android.tradefed.util.FileUtil;
51 mFakeDir = FileUtil.createTempDir("result-dir"); in setUp()
88 FileUtil.recursiveDelete(mFakeDir); in tearDown()
111 String content = FileUtil.readStringFromFile(reportFile); in testSuiteVariant()
137 String content = FileUtil.readStringFromFile(reportFile); in testSuiteVariantGSI()
167 String content = FileUtil.readStringFromFile(reportFile); in testSuiteVariantGSI_R_Compatibility()
201 String content = FileUtil.readStringFromFile(reportFile); in testSuiteVariantGSI_R_Compatibility_ATS()
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()
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/targetprep/
DVtsPythonVirtualenvPreparerTest.java29 import com.android.tradefed.util.FileUtil;
71 File requirementFile = FileUtil.createTempFile("reqfile", ".txt"); in testInstallDeps_reqFile_success()
88 FileUtil.deleteFile(requirementFile); in testInstallDeps_reqFile_success()
125 File requirementFile = FileUtil.createTempFile("reqfile", ".txt"); in testInstallDeps_reqFile_failure()
148 FileUtil.deleteFile(requirementFile); in testInstallDeps_reqFile_failure()
209 File testDir = FileUtil.createTempDir("vts-test-dir"); in test_initVirtualenv_creationSuccess()
213 FileUtil.recursiveDelete(testDir); in test_initVirtualenv_creationSuccess()
238 File testDir = FileUtil.createTempDir("vts-test-dir"); in test_initVirtualenv_creationFail_Errno26_waitSucceed()
242 FileUtil.recursiveDelete(testDir); in test_initVirtualenv_creationFail_Errno26_waitSucceed()
264 File testDir = FileUtil.createTempDir("vts-test-dir"); in test_initVirtualenv_creationFail_Errno26_waitFailed()
[all …]
/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/vts/testcases/host/selinux_test/src/com/android/tests/selinux/
DKernelSelinuxFileApiTest.java26 import com.android.tradefed.util.FileUtil;
44 mTempDir = FileUtil.createNamedTempDir("vts_selinux"); in setUpClass()
64 File selinuxTmpFile = FileUtil.createTempFile("SelinuxFile", "", mTempDir); in testSelinuxCheckReqProt()
66 String content = FileUtil.readStringFromFile(selinuxTmpFile); in testSelinuxCheckReqProt()
/test/mts/tools/mts-tradefed/tests/src/com/android/compatibility/tradefed/
DMtsTradefedTest.java23 import com.android.tradefed.util.FileUtil;
44 File root = FileUtil.createTempDir("root"); in testSuiteInfoLoad()
64 FileUtil.recursiveDelete(root); in testSuiteInfoLoad()
/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/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/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.java33 import com.android.tradefed.util.FileUtil;
84 mTestDir = FileUtil.createTempDir("jarhostest"); in setUp()
96 FileUtil.recursiveDelete(mTestDir); in tearDown()
108 File jarFile = FileUtil.createTempFile("test", ".jar", parentDir); in getJarResource()
109 FileUtil.writeToFile(jarFileStream, jarFile); in getJarResource()
/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/vts/tools/vts-core-tradefed/tests/src/com/android/compatibility/tradefed/
DVtsCoreTradefedTest.java24 import com.android.tradefed.util.FileUtil;
58 File root = FileUtil.createTempDir("root"); in testSuiteInfoLoad()
72 FileUtil.recursiveDelete(root); in testSuiteInfoLoad()
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/
DBusinessLogicPreparer.java40 import com.android.tradefed.util.FileUtil;
224 File hostFile = FileUtil.createTempFile(FILE_LOCATION, FILE_EXT); in setUp()
225 FileUtil.writeToFile(businessLogicString, hostFile); in setUp()
385 ediFile = FileUtil in getExtendedDeviceInfo()
393 String jsonString = FileUtil.readStringFromFile(ediFile); in getExtendedDeviceInfo()
437 return FileUtil.readStringFromFile(cachedFile); in readFromCache()
440 FileUtil.deleteFile(cachedFile); in readFromCache()
444 FileUtil.deleteFile(cachedFile); in readFromCache()
465 FileUtil.writeToFile(blString, cachedFile); in writeToCache()
509 FileUtil.deleteFile(new File(mHostFilePushed)); in tearDown()
DDynamicConfigPusher.java35 import com.android.tradefed.util.FileUtil;
215 localConfigFile = FileUtil.createTempFile(lookupName, ".dynamic"); in getLocalConfigFile()
216 FileUtil.writeToFile(dynamicFileRes, localConfigFile); in getLocalConfigFile()
218 FileUtil.deleteFile(localConfigFile); in getLocalConfigFile()
250 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/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()
/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/
DCompatibilityProtoResultReporter.java26 import com.android.tradefed.util.FileUtil;
78 FileUtil.deleteFile(mBaseProtoFile); in processFinalProto()
84 FileUtil.deleteFile(new File(mBaseProtoFile.getAbsolutePath() + index)); in processFinalProto()

123