Home
last modified time | relevance | path

Searched refs:tmpDir (Results 1 – 22 of 22) 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.java438 File tmpDir = FileUtil.createTempDir("tmp"); in doTestSyncFiles() local
440 File tmpFile = createTempTestFile(tmpDir); in doTestSyncFiles()
445 tmpDir.getName(), tmpFile.getName()); in doTestSyncFiles()
447 assertTrue(mTestDevice.syncFiles(tmpDir, externalStorePath)); in doTestSyncFiles()
454 File tmpFile2 = createTempTestFile(tmpDir); in doTestSyncFiles()
456 assertTrue(mTestDevice.syncFiles(tmpDir, externalStorePath)); in doTestSyncFiles()
458 tmpDir.getName(), tmpFile2.getName()); in doTestSyncFiles()
472 assertTrue(mTestDevice.syncFiles(tmpDir, externalStorePath)); in doTestSyncFiles()
481 FileUtil.recursiveDelete(tmpDir); in doTestSyncFiles()
493 File tmpDir = FileUtil.createTempDir("tmp", rootDir); in testPushDir() local
[all …]
DDeviceManagerTest.java396 File tmpDir = FileUtil.createTempDir("fake-fastbootdir"); in testUnpackZippedFastboot() local
397 File fastboot = new File(tmpDir, "fastboot"); in testUnpackZippedFastboot()
399 File zipDir = ZipUtil.createZip(tmpDir); in testUnpackZippedFastboot()
410 FileUtil.recursiveDelete(tmpDir); in testUnpackZippedFastboot()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DFileUtilTest.java344 File tmpDir = FileUtil.createTempDir("find_files_test"); in testFindFilesSuccess() local
346 File matchFile1 = FileUtil.createTempFile("test", ".config", tmpDir); in testFindFilesSuccess()
347 File subDir = new File(tmpDir, "subfolder"); in testFindFilesSuccess()
351 Set<String> matchFiles = FileUtil.findFiles(tmpDir, ".*.config"); in testFindFilesSuccess()
356 FileUtil.recursiveDelete(tmpDir); in testFindFilesSuccess()
366 File tmpDir = FileUtil.createTempDir("find_files_test"); in testFindFilesSuccess_symlink() local
369 File matchFile1 = FileUtil.createTempFile("test", ".config", tmpDir); in testFindFilesSuccess_symlink()
371 File destLink = new File(tmpDir, "subFolder"); in testFindFilesSuccess_symlink()
374 Set<String> matchFiles = FileUtil.findFiles(tmpDir, ".*.config"); in testFindFilesSuccess_symlink()
382 FileUtil.recursiveDelete(tmpDir); in testFindFilesSuccess_symlink()
[all …]
DZipUtilTest.java207 File tmpDir = null; in testPartipUnzip() local
225 tmpDir = FileUtil.createTempDir("partial_unzip"); in testPartipUnzip()
234 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
254 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
285 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
304 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
323 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
342 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
355 FileUtil.recursiveDelete(tmpDir); in testPartipUnzip()
366 File tmpDir = null; in testPartialUnzipWithUseZip64() local
[all …]
DFileUtilFuncTest.java129 File tmpDir = createTempDir("foo"); in testCreateTempDir() local
130 assertTrue(tmpDir.exists()); in testCreateTempDir()
131 assertTrue(tmpDir.isDirectory()); in testCreateTempDir()
/tools/tradefederation/core/tests/src/com/android/tradefed/config/
DConfigurationUtilTest.java146 File tmpDir = null; in testGetConfigNamesFromDirs() local
148 tmpDir = FileUtil.createTempDir("test_configs_dir"); in testGetConfigNamesFromDirs()
150 File config1 = FileUtil.createTempFile("config", ".config", tmpDir); in testGetConfigNamesFromDirs()
153 File subDir = FileUtil.getFileForPath(tmpDir, "sub"); in testGetConfigNamesFromDirs()
160 ConfigurationUtil.getConfigNamesFromDirs("sub", Arrays.asList(tmpDir)); in testGetConfigNamesFromDirs()
165 configs = ConfigurationUtil.getConfigNamesFromDirs("", Arrays.asList(tmpDir)); in testGetConfigNamesFromDirs()
170 FileUtil.recursiveDelete(tmpDir); in testGetConfigNamesFromDirs()
180 File tmpDir = null; in testGetConfigNamesFromDirs_patterns() local
182 tmpDir = FileUtil.createTempDir("test_configs_dir"); in testGetConfigNamesFromDirs_patterns()
184 FileUtil.createTempFile("whatevername", ".whateverextension", tmpDir); in testGetConfigNamesFromDirs_patterns()
[all …]
DConfigurationFactoryTest.java1525 File tmpDir = externalConfig.getParentFile(); in testSearchConfigFromEnvVar() local
1528 Mockito.doReturn(Arrays.asList(tmpDir)).when(spyFactory).getExternalTestCasesDirs(); in testSearchConfigFromEnvVar()
1543 File tmpDir = FileUtil.createTempDir("config-check-var"); in testSearchConfigFromEnvVarFailed() local
1546 Mockito.doReturn(Arrays.asList(tmpDir)).when(spyFactory).getExternalTestCasesDirs(); in testSearchConfigFromEnvVarFailed()
1551 FileUtil.recursiveDelete(tmpDir); in testSearchConfigFromEnvVarFailed()
1560 File tmpDir = FileUtil.createTempDir("test-config-dir"); in testGetConfigNamesFromTestCases_subpath() local
1562 File config1 = FileUtil.createTempFile("testconfig1", ".config", tmpDir); in testGetConfigNamesFromTestCases_subpath()
1564 File subDir = FileUtil.createTempDir("subdir", tmpDir); in testGetConfigNamesFromTestCases_subpath()
1568 Mockito.doReturn(Arrays.asList(tmpDir)).when(spyFactory).getExternalTestCasesDirs(); in testGetConfigNamesFromTestCases_subpath()
1576 FileUtil.recursiveDelete(tmpDir); in testGetConfigNamesFromTestCases_subpath()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/suite/
DSuiteApkInstallerTest.java97 File tmpDir = FileUtil.createTempDir("suite-apk-installer"); in testGetTestsDir_notDir() local
98 mTestInfo.executionFiles().put(FilesKey.TESTS_DIRECTORY, tmpDir); in testGetTestsDir_notDir()
99 File apkFile = FileUtil.createTempFile("apk-test", ".apk", tmpDir); in testGetTestsDir_notDir()
106 FileUtil.recursiveDelete(tmpDir); in testGetTestsDir_notDir()
150 File tmpDir = null; in testGetLocalPathForFileName_testsDir() local
152 tmpDir = FileUtil.createTempDir("test"); in testGetLocalPathForFileName_testsDir()
153 mTestInfo.executionFiles().put(FilesKey.TESTS_DIRECTORY, tmpDir); in testGetLocalPathForFileName_testsDir()
154 File tmpApk = FileUtil.createTempFile("suite-apk-installer", ".apk", tmpDir); in testGetLocalPathForFileName_testsDir()
161 FileUtil.recursiveDelete(tmpDir); in testGetLocalPathForFileName_testsDir()
185 File tmpDir = null; in testGetLocalPathForFileName_remoteZip() local
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DBaseTestSuiteTest.java106 File tmpDir = FileUtil.createTempDir(TEST_MODULE); in testSetupFilters_noMatch() local
107 File moduleConfig = new File(tmpDir, "module_name.config"); in testSetupFilters_noMatch()
112 mRunner.setupFilters(tmpDir); in testSetupFilters_noMatch()
117 FileUtil.recursiveDelete(tmpDir); in testSetupFilters_noMatch()
124 File tmpDir = FileUtil.createTempDir(TEST_MODULE); in testSetupFilters_match_parameterized() local
125 createConfig(tmpDir, "CtsGestureTestCases.config"); in testSetupFilters_match_parameterized()
132 mRunner.setupFilters(tmpDir); in testSetupFilters_match_parameterized()
146 FileUtil.recursiveDelete(tmpDir); in testSetupFilters_match_parameterized()
156 File tmpDir = FileUtil.createTempDir(TEST_MODULE); in testSetupFilters_parameterized_filter() local
157 createConfig(tmpDir, "CtsGestureTestCases.config"); in testSetupFilters_parameterized_filter()
[all …]
DAtestRunnerTest.java146 File tmpDir = FileUtil.createTempDir("some-dir"); in testLoadTests_WithModuleAndTFConfigSpecified() local
147 String filePath = createModuleConfig(tmpDir, "TestModule"); in testLoadTests_WithModuleAndTFConfigSpecified()
149 mSpyRunner.setupFilters(tmpDir); in testLoadTests_WithModuleAndTFConfigSpecified()
161 FileUtil.recursiveDelete(tmpDir); in testLoadTests_WithModuleAndTFConfigSpecified()
167 File tmpDir = FileUtil.createTempDir("some-dir"); in testLoadTests_WithModuleConfigSpecified() local
168 String filePath = createModuleConfig(tmpDir, "TestModule"); in testLoadTests_WithModuleConfigSpecified()
170 mSpyRunner.setupFilters(tmpDir); in testLoadTests_WithModuleConfigSpecified()
178 FileUtil.recursiveDelete(tmpDir); in testLoadTests_WithModuleConfigSpecified()
DTfSuiteRunnerTest.java265 File tmpDir = null; in testLoadTests_additionalTestsZip() local
269 tmpDir = FileUtil.createTempDir("test"); in testLoadTests_additionalTestsZip()
273 File zipDir = FileUtil.getFileForPath(tmpDir, "suite"); in testLoadTests_additionalTestsZip()
309 FileUtil.recursiveDelete(tmpDir); in testLoadTests_additionalTestsZip()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DGsiDeviceFlashPreparer.java103 File tmpDir = null; in setUp() local
105 tmpDir = FileUtil.createTempDir("gki_preparer"); in setUp()
106 validateGsiImg(device, buildInfo, tmpDir); in setUp()
111 FileUtil.recursiveDelete(tmpDir); in setUp()
230 private void validateGsiImg(ITestDevice device, IDeviceBuildInfo buildInfo, File tmpDir) in validateGsiImg() argument
244 device, mSystemImageFileName, buildInfo.getFile(GSI_SYSTEM_IMG), tmpDir); in validateGsiImg()
247 device, mVbmetaImageFileName, buildInfo.getFile(GSI_VBMETA_IMG), tmpDir); in validateGsiImg()
252 device, mBootImageFileName, buildInfo.getFile(GKI_BOOT_IMG), tmpDir); in validateGsiImg()
292 ITestDevice device, String requestedFileName, File sourceFile, File tmpDir) in getRequestedFile() argument
298 FileUtil.createTempDir(FileUtil.getBaseName(sourceFile.getName()), tmpDir); in getRequestedFile()
DGkiDeviceFlashPreparer.java84 File tmpDir = null; in setUp() local
86 tmpDir = FileUtil.createTempDir("gki_preparer"); in setUp()
87 validateGkiBootImg(device, buildInfo, tmpDir); in setUp()
92 FileUtil.recursiveDelete(tmpDir); in setUp()
200 protected void validateGkiBootImg(ITestDevice device, IDeviceBuildInfo buildInfo, File tmpDir) in validateGkiBootImg() argument
205 device, mBootImageFileName, buildInfo.getFile(GKI_BOOT_IMG), tmpDir); in validateGkiBootImg()
225 getRequestedFile(device, MKBOOTIMG, buildInfo.getFile(OTATOOLS_ZIP), tmpDir); in validateGkiBootImg()
226 mBootImg = FileUtil.createTempFile("boot", ".img", tmpDir); in validateGkiBootImg()
331 ITestDevice device, String requestedFileName, File sourceFile, File tmpDir) in getRequestedFile() argument
337 FileUtil.createTempDir(FileUtil.getBaseName(sourceFile.getName()), tmpDir); in getRequestedFile()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DTfTestLauncherTest.java180 File tmpDir = Mockito.mock(File.class); in testTestTmpDirClean_success() local
181 Mockito.when(tmpDir.list()) in testTestTmpDirClean_success()
185 mTfTestLauncher.testTmpDirClean(tmpDir, mMockListener); in testTestTmpDirClean_success()
205 File tmpDir = Mockito.mock(File.class); in testTestTmpDirClean_failExtraFile() local
206 Mockito.when(tmpDir.list()).thenReturn(new String[] {"extra_file"}); in testTestTmpDirClean_failExtraFile()
208 mTfTestLauncher.testTmpDirClean(tmpDir, mMockListener); in testTestTmpDirClean_failExtraFile()
228 File tmpDir = Mockito.mock(File.class); in testTestTmpDirClean_failMultipleFiles() local
229 Mockito.when(tmpDir.list()).thenReturn(new String[] {"inv_1", "inv_2"}); in testTestTmpDirClean_failMultipleFiles()
231 mTfTestLauncher.testTmpDirClean(tmpDir, mMockListener); in testTestTmpDirClean_failMultipleFiles()
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/
DTradefedSandboxTest.java262 File tmpDir = FileUtil.createTempDir("tmp-sandbox-dir"); in testSandboxOptions() local
268 setter.setOptionValue("sandbox:tf-location", tmpDir.getAbsolutePath()); in testSandboxOptions()
276 assertEquals(tmpDir, res); in testSandboxOptions()
278 FileUtil.recursiveDelete(tmpDir); in testSandboxOptions()
288 File tmpDir = FileUtil.createTempDir("tmp-sandbox-dir"); in testSandboxOptions_exclusion() local
294 setter.setOptionValue("sandbox:tf-location", tmpDir.getAbsolutePath()); in testSandboxOptions_exclusion()
311 FileUtil.recursiveDelete(tmpDir); in testSandboxOptions_exclusion()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/adb/
DAdbStopServerPreparerTest.java188 File tmpDir = FileUtil.createTempDir("adb-preparer-tests"); in testAdbFromEnv() local
190 FileUtil.mkdirsRWX(new File(tmpDir, "bin")); in testAdbFromEnv()
191 File fakeAdb = new File(tmpDir, "bin/adb"); in testAdbFromEnv()
193 mEnvironment = tmpDir.getAbsolutePath(); in testAdbFromEnv()
216 FileUtil.recursiveDelete(tmpDir); in testAdbFromEnv()
/tools/tradefederation/contrib/src/com/android/media/tests/
DCamera2StressTest.java111 File tmpDir = null; in postScreenshotOnFailure() local
115 tmpDir = FileUtil.createTempDir("screenshot"); in postScreenshotOnFailure()
125 File screenshot = new File(tmpDir, remoteFile.getName()); in postScreenshotOnFailure()
141 FileUtil.recursiveDelete(tmpDir); in postScreenshotOnFailure()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DFileUtil.java298 File tmpDir = File.createTempFile(prefix, "", parentDir); in createTempDir() local
299 return deleteFileAndCreateDirWithSameName(tmpDir); in createTempDir()
302 private static File deleteFileAndCreateDirWithSameName(File tmpDir) throws IOException { in deleteFileAndCreateDirWithSameName() argument
303 tmpDir.delete(); in deleteFileAndCreateDirWithSameName()
304 return createDir(tmpDir); in deleteFileAndCreateDirWithSameName()
307 private static File createDir(File tmpDir) throws IOException { in createDir() argument
308 if (!tmpDir.mkdirs()) { in createDir()
311 return tmpDir; in createDir()
/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/invoker/
DInvocationExecution.java889 String tmpDir = "/tmp";
891 tmpDir = System.getenv("TMPDIR");
901 File adbLog = new File(tmpDir, String.format("adb.%s.log", uid));
/tools/tradefederation/core/tests/res/testdata/
Dtradefed-prebuilt-cts-8.0_r21.jarMETA-INF/ META-INF/MANIFEST.MF jline/ jline/CompletionHandler.class CompletionHandler ...