Home
last modified time | relevance | path

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

/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DTestDeviceStressTest.java59 File tmpDir = null; in createTempTestFiles() local
62 tmpDir = FileUtil.createTempDir("testDir"); in createTempTestFiles()
66 tmpFile = FileUtil.createTempFile(String.format("tmp_%d", i), ".txt", tmpDir); in createTempTestFiles()
69 return tmpDir; in createTempTestFiles()
111 File tmpDir = null; in testPushFolderWithManyFiles() local
121 tmpDir = createTempTestFiles(); in testPushFolderWithManyFiles()
126 assertTrue(mTestDevice.pushDir(tmpDir, deviceFilePath)); in testPushFolderWithManyFiles()
130 if (tmpDir != null) { in testPushFolderWithManyFiles()
131 FileUtil.recursiveDelete(tmpDir); in testPushFolderWithManyFiles()
143 File tmpDir = null; in testSyncDataWithManyFiles() local
[all …]
DTestDeviceFuncTest.java431 File tmpDir = FileUtil.createTempDir("tmp"); in doTestSyncFiles() local
433 File tmpFile = createTempTestFile(tmpDir); in doTestSyncFiles()
438 tmpDir.getName(), tmpFile.getName()); in doTestSyncFiles()
440 assertTrue(mTestDevice.syncFiles(tmpDir, externalStorePath)); in doTestSyncFiles()
447 File tmpFile2 = createTempTestFile(tmpDir); in doTestSyncFiles()
449 assertTrue(mTestDevice.syncFiles(tmpDir, externalStorePath)); in doTestSyncFiles()
451 tmpDir.getName(), tmpFile2.getName()); in doTestSyncFiles()
465 assertTrue(mTestDevice.syncFiles(tmpDir, externalStorePath)); in doTestSyncFiles()
474 FileUtil.recursiveDelete(tmpDir); in doTestSyncFiles()
486 File tmpDir = FileUtil.createTempDir("tmp", rootDir); in testPushDir() local
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/config/
DConfigurationUtilTest.java129 File tmpDir = null; in testGetConfigNamesFromDirs() local
131 tmpDir = FileUtil.createTempDir("test_configs_dir"); in testGetConfigNamesFromDirs()
133 File config1 = FileUtil.createTempFile("config", ".config", tmpDir); in testGetConfigNamesFromDirs()
135 File subDir = FileUtil.getFileForPath(tmpDir, "sub"); in testGetConfigNamesFromDirs()
141 ConfigurationUtil.getConfigNamesFromDirs("sub", Arrays.asList(tmpDir)); in testGetConfigNamesFromDirs()
146 configs = ConfigurationUtil.getConfigNamesFromDirs("", Arrays.asList(tmpDir)); in testGetConfigNamesFromDirs()
151 FileUtil.recursiveDelete(tmpDir); in testGetConfigNamesFromDirs()
161 File tmpDir = null; in testGetConfigNamesFromDirs_patterns() local
163 tmpDir = FileUtil.createTempDir("test_configs_dir"); in testGetConfigNamesFromDirs_patterns()
165 FileUtil.createTempFile("whatevername", ".whateverextension", tmpDir); in testGetConfigNamesFromDirs_patterns()
[all …]
DConfigurationFactoryTest.java1466 File tmpDir = externalConfig.getParentFile(); in testSearchConfigFromEnvVar() local
1469 Mockito.doReturn(Arrays.asList(tmpDir)).when(spyFactory).getExternalTestCasesDirs(); in testSearchConfigFromEnvVar()
1484 File tmpDir = FileUtil.createTempDir("config-check-var"); in testSearchConfigFromEnvVarFailed() local
1487 Mockito.doReturn(Arrays.asList(tmpDir)).when(spyFactory).getExternalTestCasesDirs(); in testSearchConfigFromEnvVarFailed()
1492 FileUtil.recursiveDelete(tmpDir); in testSearchConfigFromEnvVarFailed()
1501 File tmpDir = FileUtil.createTempDir("test-config-dir"); in testGetConfigNamesFromTestCases_subpath() local
1503 FileUtil.createTempFile("testconfig1", ".config", tmpDir); in testGetConfigNamesFromTestCases_subpath()
1504 File subDir = FileUtil.createTempDir("subdir", tmpDir); in testGetConfigNamesFromTestCases_subpath()
1507 Mockito.doReturn(Arrays.asList(tmpDir)).when(spyFactory).getExternalTestCasesDirs(); in testGetConfigNamesFromTestCases_subpath()
1515 FileUtil.recursiveDelete(tmpDir); in testGetConfigNamesFromTestCases_subpath()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DBaseTestSuiteTest.java88 File tmpDir = FileUtil.createTempDir(TEST_MODULE); in testSetupFilters_noMatch() local
89 File moduleConfig = new File(tmpDir, "module_name.config"); in testSetupFilters_noMatch()
94 mRunner.setupFilters(tmpDir); in testSetupFilters_noMatch()
99 FileUtil.recursiveDelete(tmpDir); in testSetupFilters_noMatch()
106 File tmpDir = FileUtil.createTempDir(TEST_MODULE); in testSetupFilters_oneMatch() local
107 File moduleConfig = new File(tmpDir, "module_name.config"); in testSetupFilters_oneMatch()
108 File moduleConfig2 = new File(tmpDir, "module_name2.config"); in testSetupFilters_oneMatch()
114 mRunner.setupFilters(tmpDir); in testSetupFilters_oneMatch()
122 FileUtil.recursiveDelete(tmpDir); in testSetupFilters_oneMatch()
132 File tmpDir = FileUtil.createTempDir(TEST_MODULE); in testSetupFilters_multiMatchNoExactMatch() local
[all …]
DTfSuiteRunnerTest.java230 File tmpDir = null; in testLoadTests_additionalTestsZip() local
234 tmpDir = FileUtil.createTempDir("test"); in testLoadTests_additionalTestsZip()
238 File zipDir = FileUtil.getFileForPath(tmpDir, "suite"); in testLoadTests_additionalTestsZip()
270 FileUtil.recursiveDelete(tmpDir); in testLoadTests_additionalTestsZip()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DFileUtilTest.java342 File tmpDir = FileUtil.createTempDir("find_files_test"); in testFindFilesSuccess() local
344 File matchFile1 = FileUtil.createTempFile("test", ".config", tmpDir); in testFindFilesSuccess()
345 File subDir = new File(tmpDir, "subfolder"); in testFindFilesSuccess()
349 Set<String> matchFiles = FileUtil.findFiles(tmpDir, ".*.config"); in testFindFilesSuccess()
354 FileUtil.recursiveDelete(tmpDir); in testFindFilesSuccess()
364 File tmpDir = FileUtil.createTempDir("find_files_test"); in testFindFilesSuccess_symlink() local
367 File matchFile1 = FileUtil.createTempFile("test", ".config", tmpDir); in testFindFilesSuccess_symlink()
369 File destLink = new File(tmpDir, "subFolder"); in testFindFilesSuccess_symlink()
372 Set<String> matchFiles = FileUtil.findFiles(tmpDir, ".*.config"); in testFindFilesSuccess_symlink()
380 FileUtil.recursiveDelete(tmpDir); in testFindFilesSuccess_symlink()
[all …]
DGCSBucketUtilFuncTest.java95 File tmpDir = FileUtil.createTempDir(BUCKET_NAME_PREFIX); in testDownloadMultiple() local
102 sBucket.pull(Paths.get("/"), tmpDir); in testDownloadMultiple()
104 File tmpDirBucket = new File(tmpDir, sBucket.getBucketName()); in testDownloadMultiple()
114 FileUtil.recursiveDelete(tmpDir); in testDownloadMultiple()
DFileUtilFuncTest.java121 File tmpDir = createTempDir("foo"); in testCreateTempDir() local
122 assertTrue(tmpDir.exists()); in testCreateTempDir()
123 assertTrue(tmpDir.isDirectory()); in testCreateTempDir()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/suite/
DSuiteApkInstallerTest.java88 File tmpDir = FileUtil.createTempDir("suite-apk-installer"); in testGetTestsDir_noVar() local
91 attributes.put("ROOT_DIR", tmpDir.getAbsolutePath()); in testGetTestsDir_noVar()
95 assertEquals(tmpDir.getAbsolutePath(), res.getAbsolutePath()); in testGetTestsDir_noVar()
97 FileUtil.recursiveDelete(tmpDir); in testGetTestsDir_noVar()
134 File tmpDir = FileUtil.createTempDir("suite-apk-installer"); in testGetTestsDir_notDir() local
135 File apkFile = FileUtil.createTempFile("apk-test", ".apk", tmpDir); in testGetTestsDir_notDir()
146 attributes.put("ROOT_DIR", tmpDir.getAbsolutePath()); in testGetTestsDir_notDir()
155 FileUtil.recursiveDelete(tmpDir); in testGetTestsDir_notDir()
221 File tmpDir = null; in testGetLocalPathForFileName_testsDir() local
223 tmpDir = FileUtil.createTempDir("test"); in testGetLocalPathForFileName_testsDir()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DTfTestLauncherTest.java157 File tmpDir = Mockito.mock(File.class); in testTestTmpDirClean_success() local
158 Mockito.when(tmpDir.list()) in testTestTmpDirClean_success()
162 mTfTestLauncher.testTmpDirClean(tmpDir, mMockListener); in testTestTmpDirClean_success()
180 File tmpDir = Mockito.mock(File.class); in testTestTmpDirClean_failExtraFile() local
181 Mockito.when(tmpDir.list()).thenReturn(new String[] {"extra_file"}); in testTestTmpDirClean_failExtraFile()
183 mTfTestLauncher.testTmpDirClean(tmpDir, mMockListener); in testTestTmpDirClean_failExtraFile()
201 File tmpDir = Mockito.mock(File.class); in testTestTmpDirClean_failMultipleFiles() local
202 Mockito.when(tmpDir.list()).thenReturn(new String[] {"inv_1", "inv_2"}); in testTestTmpDirClean_failMultipleFiles()
204 mTfTestLauncher.testTmpDirClean(tmpDir, mMockListener); in testTestTmpDirClean_failMultipleFiles()
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/
DTradefedSandboxTest.java199 File tmpDir = FileUtil.createTempDir("tmp-sandbox-dir"); in testSandboxOptions() local
205 setter.setOptionValue("sandbox:tf-location", tmpDir.getAbsolutePath()); in testSandboxOptions()
213 assertEquals(tmpDir, res); in testSandboxOptions()
215 FileUtil.recursiveDelete(tmpDir); in testSandboxOptions()
225 File tmpDir = FileUtil.createTempDir("tmp-sandbox-dir"); in testSandboxOptions_exclusion() local
231 setter.setOptionValue("sandbox:tf-location", tmpDir.getAbsolutePath()); in testSandboxOptions_exclusion()
248 FileUtil.recursiveDelete(tmpDir); in testSandboxOptions_exclusion()
/tools/tradefederation/contrib/src/com/android/media/tests/
DCamera2StressTest.java108 File tmpDir = null; in postScreenshotOnFailure() local
112 tmpDir = FileUtil.createTempDir("screenshot"); in postScreenshotOnFailure()
122 File screenshot = new File(tmpDir, remoteFile.getName()); in postScreenshotOnFailure()
138 FileUtil.recursiveDelete(tmpDir); in postScreenshotOnFailure()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DTestFilePushSetupTest.java80 File tmpDir = mAltDirFile1.getParentFile(); in tearDown() local
83 FileUtil.recursiveDelete(tmpDir); in tearDown()
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DTfTestLauncher.java334 protected void testTmpDirClean(File tmpDir, ITestInvocationListener listener) { in testTmpDirClean() argument
338 String[] listFiles = tmpDir.list(); in testTmpDirClean()