Home
last modified time | relevance | path

Searched refs:tempDir (Results 1 – 25 of 539) sorted by relevance

12345678910>>...22

/aosp_15_r20/external/google-smali/util/src/test/java/com/android/tools/smali/util/
H A DClassFileNameHandlerTest.java122 File tempDir = Files.createTempDir().getCanonicalFile(); in testMultipleLongNames() local
123 ClassFileNameHandler handler = new ClassFileNameHandler(tempDir, ".smali"); in testMultipleLongNames()
128 …checkFilename(tempDir, file1, "a", "a", Strings.repeat("a", 124) + "#" + Strings.repeat("a", 118) … in testMultipleLongNames()
131 …checkFilename(tempDir, file2, "a", "a", Strings.repeat("a", 124) + "#" + Strings.repeat("a", 118) … in testMultipleLongNames()
138 File tempDir = Files.createTempDir().getCanonicalFile(); in testBasicFunctionality() local
139 ClassFileNameHandler handler = new ClassFileNameHandler(tempDir, ".smali"); in testBasicFunctionality()
142 checkFilename(tempDir, file, "a", "b", "c", "d.smali"); in testBasicFunctionality()
145 checkFilename(tempDir, file, "a", "b", "c", "e.smali"); in testBasicFunctionality()
148 checkFilename(tempDir, file, "a", "b", "d", "d.smali"); in testBasicFunctionality()
151 checkFilename(tempDir, file, "a", "b.smali"); in testBasicFunctionality()
[all …]
/aosp_15_r20/tools/tradefederation/core/javatests/com/android/tradefed/util/testmapping/
DTestMappingTest.java72 File tempDir = null; in testparseTestMapping() local
76 tempDir = FileUtil.createTempDir("test_mapping"); in testparseTestMapping()
79 File testMappingRootDir = FileUtil.createTempDir("subdir", tempDir); in testparseTestMapping()
87 Paths.get(tempDir.getAbsolutePath()), in testparseTestMapping()
105 Paths.get(tempDir.getAbsolutePath()), in testparseTestMapping()
123 Paths.get(tempDir.getAbsolutePath()), in testparseTestMapping()
149 Paths.get(tempDir.getAbsolutePath()), in testparseTestMapping()
169 FileUtil.recursiveDelete(tempDir); in testparseTestMapping()
176 File tempDir = null; in testparseTestMapping_BadJson() local
179 tempDir = FileUtil.createTempDir("test_mapping"); in testparseTestMapping_BadJson()
[all …]
/aosp_15_r20/tools/tradefederation/core/javatests/com/android/tradefed/testtype/suite/
DTestMappingSuiteRunnerTest.java214 File tempDir = null; in testLoadTestsWhenRemoteTestTimeoutIsSet() local
220 tempDir = FileUtil.createTempDir("test_mapping"); in testLoadTestsWhenRemoteTestTimeoutIsSet()
222 File srcDir = FileUtil.createTempDir("src", tempDir); in testLoadTestsWhenRemoteTestTimeoutIsSet()
237 Arrays.asList(srcDir, new File(tempDir, DISABLED_PRESUBMIT_TESTS)); in testLoadTestsWhenRemoteTestTimeoutIsSet()
238 File zipFile = Paths.get(tempDir.getAbsolutePath(), TEST_MAPPINGS_ZIP).toFile(); in testLoadTestsWhenRemoteTestTimeoutIsSet()
262 FileUtil.recursiveDelete(tempDir); in testLoadTestsWhenRemoteTestTimeoutIsSet()
310 File tempDir = null; in testLoadTests_testMappingsZip() local
314 tempDir = FileUtil.createTempDir("test_mapping"); in testLoadTests_testMappingsZip()
316 File srcDir = FileUtil.createTempDir("src", tempDir); in testLoadTests_testMappingsZip()
331 Arrays.asList(srcDir, new File(tempDir, DISABLED_PRESUBMIT_TESTS)); in testLoadTests_testMappingsZip()
[all …]
/aosp_15_r20/external/apache-commons-io/src/test/java/org/apache/commons/io/file/
H A DPathUtilsDeleteFileTest.java45 private Path tempDir; field in PathUtilsDeleteFileTest
50 if (Files.exists(tempDir) && PathUtils.isEmptyDirectory(tempDir)) { in afterEach()
51 Files.deleteIfExists(tempDir); in afterEach()
57 tempDir = Files.createTempDirectory(getClass().getCanonicalName()); in beforeEach()
64 final Path missingFile = tempDir.resolve("missing.txt"); in testDeleteBrokenLink()
65 final Path brokenLink = tempDir.resolve("broken.txt"); in testDeleteBrokenLink()
82 …ory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-0/" + fileName), tempDir); in testDeleteFileDirectory1FileSize0()
83 assertCounts(0, 1, 0, PathUtils.deleteFile(tempDir.resolve(fileName))); in testDeleteFileDirectory1FileSize0()
85 Files.deleteIfExists(tempDir); in testDeleteFileDirectory1FileSize0()
94 …ory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-1/" + fileName), tempDir); in testDeleteFileDirectory1FileSize1()
[all …]
H A DDeletingPathVisitorTest.java39 private Path tempDir; field in DeletingPathVisitorTest
42 Files.walkFileTree(tempDir, visitor); in applyDeleteEmptyDirectory()
54 Files.deleteIfExists(tempDir); in testDeleteEmptyDirectory()
65 Files.deleteIfExists(tempDir); in testDeleteEmptyDirectoryNullCtorArg()
74 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-0"), tempDir); in testDeleteFolders1FileSize0()
75 assertCounts(1, 1, 0, PathUtils.visitFileTree(visitor, tempDir)); in testDeleteFolders1FileSize0()
77 Files.deleteIfExists(tempDir); in testDeleteFolders1FileSize0()
86 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-1"), tempDir); in testDeleteFolders1FileSize1()
87 assertCounts(1, 1, 1, PathUtils.visitFileTree(visitor, tempDir)); in testDeleteFolders1FileSize1()
89 Files.deleteIfExists(tempDir); in testDeleteFolders1FileSize1()
[all …]
H A DCleaningPathVisitorTest.java42 private Path tempDir; field in CleaningPathVisitorTest
45 Files.walkFileTree(tempDir, visitor); in applyCleanEmptyDirectory()
73 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-0"), tempDir); in testCleanFolders1FileSize0()
74 final CleaningPathVisitor visitFileTree = PathUtils.visitFileTree(visitor, tempDir); in testCleanFolders1FileSize0()
90 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-1"), tempDir); in testCleanFolders1FileSize1()
91 final CleaningPathVisitor visitFileTree = PathUtils.visitFileTree(visitor, tempDir); in testCleanFolders1FileSize1()
107 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-1"), tempDir); in testCleanFolders1FileSize1Skip()
110 final CountingPathVisitor visitFileTree = PathUtils.visitFileTree(visitor, tempDir); in testCleanFolders1FileSize1Skip()
113 final Path skippedFile = tempDir.resolve(skipFileName); in testCleanFolders1FileSize1Skip()
129 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-2-file-size-2"), tempDir); in testCleanFolders2FileSize2()
[all …]
H A DPathUtilsCleanDirectoryTest.java35 private Path tempDir; field in PathUtilsCleanDirectoryTest
42 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-0"), tempDir); in testCleanDirectory1FileSize0()
43 assertCounts(1, 1, 0, PathUtils.cleanDirectory(tempDir)); in testCleanDirectory1FileSize0()
51 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-1"), tempDir); in testCleanDirectory1FileSize1()
52 assertCounts(1, 1, 1, PathUtils.cleanDirectory(tempDir)); in testCleanDirectory1FileSize1()
60 …s.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-2-file-size-2"), tempDir); in testCleanDirectory2FileSize2()
61 assertCounts(3, 2, 2, PathUtils.cleanDirectory(tempDir)); in testCleanDirectory2FileSize2()
69 assertCounts(1, 0, 0, PathUtils.cleanDirectory(tempDir)); in testCleanEmptyDirectory()
H A DTempDirectoryTest.java39 try (TempDirectory tempDir = TempDirectory.create(getClass().getCanonicalName())) { in testCreatePath() argument
40 ref = tempDir; in testCreatePath()
41 assertTrue(FileUtils.isEmptyDirectory(tempDir.toFile())); in testCreatePath()
54 …try (TempDirectory tempDir = TempDirectory.create(Paths.get("target"), getClass().getCanonicalName… in testCreateString() argument
55 ref = tempDir; in testCreateString()
56 assertTrue(FileUtils.isEmptyDirectory(tempDir.toFile())); in testCreateString()
/aosp_15_r20/frameworks/base/services/incremental/test/
H A DIncrementalServiceTest.cpp872 TemporaryDir tempDir; in TEST_F() local
874 mIncrementalService->createStorage(tempDir.path, mDataLoaderParcel, in TEST_F()
883 TemporaryDir tempDir; in TEST_F() local
885 mIncrementalService->createStorage(tempDir.path, mDataLoaderParcel, in TEST_F()
896 TemporaryDir tempDir; in TEST_F() local
898 mIncrementalService->createStorage(tempDir.path, mDataLoaderParcel, in TEST_F()
910 TemporaryDir tempDir; in TEST_F() local
912 mIncrementalService->createStorage(tempDir.path, mDataLoaderParcel, in TEST_F()
928 TemporaryDir tempDir; in TEST_F() local
930 mIncrementalService->createStorage(tempDir.path, mDataLoaderParcel, in TEST_F()
[all …]
/aosp_15_r20/prebuilts/go/linux-x86/src/os/
Dremoveall_test.go209 tempDir, err := MkdirTemp("", "TestRemoveAllDot-")
213 defer RemoveAll(tempDir)
215 err = Chdir(tempDir)
234 tempDir := t.TempDir()
235 subdir := filepath.Join(tempDir, "x")
254 tempDir := t.TempDir()
255 subdir := filepath.Join(tempDir, "x")
286 tempDir := t.TempDir()
315 if err := Mkdir(filepath.Join(tempDir, dir), 0777); err != nil {
320 d := filepath.Join(tempDir, dir)
[all …]
/aosp_15_r20/hardware/libhardware/tests/input/evdev/
H A DInputHub_test.cpp97 auto tempDir = std::make_shared<TempDir>(); in TEST_F() local
105 ASSERT_EQ(OK, mInputHub->registerDevicePath(tempDir->getName())); in TEST_F()
113 tempFile.reset(tempDir->newTempFile()); in TEST_F()
129 auto tempDir = std::make_unique<TempDir>(); in TEST_F() local
130 auto deviceFile = std::unique_ptr<TempFile>(tempDir->newTempFile()); in TEST_F()
144 ASSERT_EQ(OK, mInputHub->registerDevicePath(tempDir->getName())); in TEST_F()
160 auto tempDir = std::make_unique<TempDir>(); in TEST_F() local
161 auto deviceFile = std::unique_ptr<TempFile>(tempDir->newTempFile()); in TEST_F()
191 ASSERT_EQ(OK, mInputHub->registerDevicePath(tempDir->getName())); in TEST_F()
202 auto tempDir = std::make_unique<TempDir>(); in TEST_F() local
[all …]
/aosp_15_r20/tools/tradefederation/core/javatests/com/android/tradefed/util/
DBugreportTest.java57 File tempDir = null; in setUp() local
59 tempDir = FileUtil.createTempDir("bugreportz"); in setUp()
60 File mainEntry = FileUtil.createTempFile("main_entry", ".txt", tempDir); in setUp()
61 File bugreport = FileUtil.createTempFile(BUGREPORT_PREFIX, ".txt", tempDir); in setUp()
66 mainEntry.renameTo(new File(tempDir, "main_entry.txt")); in setUp()
72 ZipUtil.addToZip(out, new File(tempDir, "main_entry.txt"), new LinkedList<String>()); in setUp()
75 FileUtil.recursiveDelete(tempDir); in setUp()
153 File tempDir = null; in testBugreportz_noMainFile() local
156 tempDir = FileUtil.createTempDir("bugreportz"); in testBugreportz_noMainFile()
157 File bugreport = FileUtil.createTempFile(BUGREPORT_PREFIX, ".txt", tempDir); in testBugreportz_noMainFile()
[all …]
/aosp_15_r20/external/toolchain-utils/compiler_wrapper/
H A Dandroid_config_test.go44 createBisectGoldenInputs(filepath.Join(ctx.tempDir, "clang")),
51 gomaPath := path.Join(ctx.tempDir, "gomacc")
53 defaultPath := filepath.Join(ctx.tempDir, "clang")
54 clangTidyPath := filepath.Join(ctx.tempDir, "clang-tidy")
58 ctx.writeFile(filepath.Join(ctx.tempDir, "/pathenv/clang"), "")
77 WrapperCmd: newGoldenCmd(filepath.Join(ctx.tempDir, "clang++"), mainCc),
98 Env: []string{"PATH=" + filepath.Join(ctx.tempDir, "/pathenv")},
113 "ANDROID_LLVM_STDERR_REDIRECT=" + filepath.Join(ctx.tempDir, "fallback_stderr"),
116 defaultPath := filepath.Join(ctx.tempDir, "clang")
H A Denv_test.go178 tempFile := path.Join(ctx.tempDir, "some_file")
242 tempDir, err := ioutil.TempDir("", "wrapper_env_test")
248 defer os.RemoveAll(tempDir)
250 tempDirLink := tempDir + ".symlink"
251 if err := os.Symlink(tempDir, tempDirLink); err != nil {
252 t.Fatalf("Failed creating symlink %q => %q: %v", tempDirLink, tempDir, err)
255 if err := os.Chdir(tempDir); err != nil {
284 if wd := env.getwd(); wd != tempDir {
285 t.Errorf("Environment setup had a wd of %q; wanted %q", cwdLink, tempDir)
329 fullPath := filepath.Join(ctx.tempDir, cmd.Path)
H A Dtestutil_test.go39 tempDir string member
59 tempDir, err := ioutil.TempDir("", "compiler_wrapper")
63 defer os.RemoveAll(tempDir)
67 wd: tempDir,
68 tempDir: tempDir,
88 d := filepath.Join(ctx.tempDir, "cros-artifacts")
213 fullFileName = filepath.Join(ctx.tempDir, fullFileName)
225 oldname = filepath.Join(ctx.tempDir, oldname)
228 newname = filepath.Join(ctx.tempDir, newname)
/aosp_15_r20/build/soong/cmd/sbox/
H A Dsbox.go149 tempDir := filepath.Join(sandboxesRoot, "sbox", hex.EncodeToString(hash.Sum(nil)))
151 err = os.RemoveAll(tempDir)
155 err = os.MkdirAll(tempDir, 0777)
167 os.RemoveAll(tempDir)
176 localTempDir := tempDir
291 func runCommand(command *sbox_proto.Command, tempDir string, commandIndex int) (depFile string, err…
303 pathToTempDirInSbox := tempDir
308 err = os.MkdirAll(tempDir, 0777)
310 return "", fmt.Errorf("failed to create %q: %w", tempDir, err)
314 err = copyFiles(command.CopyBefore, "", tempDir, requireFromExists, alwaysWrite)
[all …]
/aosp_15_r20/cts/apps/CtsVerifier/src/com/android/cts/verifier/
H A DReportExporter.java86 private void copyReportFiles(File tempDir) { in copyReportFiles() argument
88 Log.d(TAG, "copyReportFiles(" + tempDir.getAbsolutePath() + ")"); in copyReportFiles()
97 copyFilesRecursively(reportLogFolder, tempDir); in copyReportFiles()
143 File tempDir = new File(verifierReportsDir, reportName); in doInBackground() local
144 tempDir.mkdirs(); in doInBackground()
147 copyReportFiles(tempDir); in doInBackground()
161 tempDir, in doInBackground()
171 ScreenshotsMetadataHandler.writeResults(result, tempDir); in doInBackground()
175 copyFormattingFiles(tempDir); in doInBackground()
178 ZipUtil.createZip(tempDir, reportZipFile); in doInBackground()
[all …]
/aosp_15_r20/frameworks/base/services/tests/powerservicetests/src/com/android/server/power/
H A DShutdownCheckPointsTest.java273 File tempDir = createTempDir(); in testDumpToFile() local
274 File baseFile = new File(tempDir, "checkpoints"); in testDumpToFile()
284 File[] dumpFiles = tempDir.listFiles(); in testDumpToFile()
310 File tempDir = createTempDir(); in testTooManyFilesDropsOlderOnes() local
311 File baseFile = new File(tempDir, "checkpoints"); in testTooManyFilesDropsOlderOnes()
321 File[] dumpFiles = tempDir.listFiles(); in testTooManyFilesDropsOlderOnes()
362 File tempDir = File.createTempFile("checkpoints", "out"); in createTempDir() local
363 tempDir.delete(); in createTempDir()
364 tempDir.mkdir(); in createTempDir()
365 return tempDir; in createTempDir()
/aosp_15_r20/prebuilts/r8/src/com/android/tools/r8wrappers/retrace/
H A DRetraceWrapper.java110 Retracer getRetracer(Path tempDir) throws Exception; in getRetracer() argument
130 public Retracer getRetracer(Path tempDir) throws Exception { in getRetracer() argument
163 public Retracer getRetracer(Path tempDir) throws IOException, InterruptedException { in getRetracer() argument
165 Path mapFile = fetchArtifact(buildInfo, mappingFile, zipEntry, tempDir); in getRetracer()
535 private static void retrace(InputStream stream, LazyRetracer defaultRetracer, Path tempDir) in retrace() argument
568 retraceStackTrace(defaultRetracer, exceptionLine, frames, tempDir); in retrace()
589 Path tempDir) in retraceStackTrace() argument
597 Retracer retracer = lazyRetracer.getRetracer(tempDir); in retraceStackTrace()
777 private static void populateRemoteMappingFileMap(BuildInfo buildInfo, Path tempDir) in populateRemoteMappingFileMap() argument
779 Path baseDirectory = getTempBuildDirPath(buildInfo, tempDir); in populateRemoteMappingFileMap()
[all …]
/aosp_15_r20/external/apache-commons-io/src/test/java/org/apache/commons/io/output/
H A DDeferredFileOutputStreamTest.java99 …ThresholdGetInputStream(final int initialBufferSize, final @TempDir Path tempDir) throws IOExcepti… in testAboveThresholdGetInputStream() argument
100 final File testFile = tempDir.resolve("testAboveThreshold.dat").toFile(); in testAboveThresholdGetInputStream()
199 final Path tempDir = Paths.get("target"); in testTempFileAboveThreshold() local
206 .setDirectory(tempDir) in testTempFileAboveThreshold()
207 .setDirectory(tempDir.toFile()) in testTempFileAboveThreshold()
221 assertEquals(tempDir, dfos.getPath().getParent(), "Check dir"); in testTempFileAboveThreshold()
239 final Path tempDir = null; in testTempFileAboveThresholdPrefixOnly() local
246 .setDirectory(tempDir) in testTempFileAboveThresholdPrefixOnly()
277 final File tempDir = FileUtils.current(); in testTempFileBelowThreshold() local
278 … = new DeferredFileOutputStream(testBytes.length + 42, initialBufferSize, prefix, suffix, tempDir); in testTempFileBelowThreshold()
[all …]
/aosp_15_r20/external/cronet/net/base/
H A Ddirectory_lister_unittest.cc212 base::ScopedTempDir tempDir; in TEST_F() local
213 EXPECT_TRUE(tempDir.CreateUniqueTempDir()); in TEST_F()
216 DirectoryLister lister(tempDir.GetPath(), &delegate); in TEST_F()
263 base::ScopedTempDir tempDir; in TEST_F() local
264 EXPECT_TRUE(tempDir.CreateUniqueTempDir()); in TEST_F()
267 DirectoryLister lister(tempDir.GetPath(), &delegate); in TEST_F()
277 base::ScopedTempDir tempDir; in TEST_F() local
278 EXPECT_TRUE(tempDir.CreateUniqueTempDir()); in TEST_F()
282 tempDir.GetPath().AppendASCII("this_path_does_not_exist"), &delegate); in TEST_F()
/aosp_15_r20/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DPersistentIntTest.kt43 lateinit var tempDir: Path variable in com.android.server.net.PersistentIntTest
47 tempDir = Files.createTempDirectory("tmp.PersistentIntTest.") in setUp()
53 Files.setPosixFilePermissions(tempDir, permissions) in tearDown()
58 Files.delete(tempDir) in tearDown()
76 setWritable(tempDir, false) in testReadOrWriteFailsInCreate()
95 setWritable(tempDir, false) // Writing creates a new file+renames, make this fail. in testReadOrWriteFailsAfterCreate()
129 return tempDir.resolve(Integer.toHexString(Random().nextInt())).also { in randomTempPath()
/aosp_15_r20/external/cronet/third_party/icu/source/test/perf/leperf/
H A DFontObject.cpp33 SFNTDirectory tempDir; in FontObject() local
35 fread(&tempDir, sizeof tempDir, 1, file); in FontObject()
37 numTables = SWAPW(tempDir.numTables); in FontObject()
38 searchRange = SWAPW(tempDir.searchRange) >> 4; in FontObject()
39 entrySelector = SWAPW(tempDir.entrySelector); in FontObject()
40 rangeShift = SWAPW(tempDir.rangeShift) >> 4; in FontObject()
42 int dirSize = sizeof tempDir + ((numTables - ANY_NUMBER) * sizeof(DirectoryEntry)); in FontObject()
/aosp_15_r20/external/icu/icu4c/source/test/letest/
H A DFontObject.cpp31 SFNTDirectory tempDir; in FontObject() local
33 fread(&tempDir, sizeof tempDir, 1, file); in FontObject()
35 numTables = SWAPW(tempDir.numTables); in FontObject()
36 searchRange = SWAPW(tempDir.searchRange) >> 4; in FontObject()
37 entrySelector = SWAPW(tempDir.entrySelector); in FontObject()
38 rangeShift = SWAPW(tempDir.rangeShift) >> 4; in FontObject()
40 int dirSize = sizeof tempDir + ((numTables - ANY_NUMBER) * sizeof(DirectoryEntry)); in FontObject()
/aosp_15_r20/external/icu/icu4c/source/test/perf/leperf/
H A DFontObject.cpp35 SFNTDirectory tempDir; in FontObject() local
37 fread(&tempDir, sizeof tempDir, 1, file); in FontObject()
39 numTables = SWAPW(tempDir.numTables); in FontObject()
40 searchRange = SWAPW(tempDir.searchRange) >> 4; in FontObject()
41 entrySelector = SWAPW(tempDir.entrySelector); in FontObject()
42 rangeShift = SWAPW(tempDir.rangeShift) >> 4; in FontObject()
44 int dirSize = sizeof tempDir + ((numTables - ANY_NUMBER) * sizeof(DirectoryEntry)); in FontObject()

12345678910>>...22