Home
last modified time | relevance | path

Searched refs:testFile (Results 1 – 23 of 23) sorted by relevance

/tools/tradefederation/core/javatests/com/android/tradefed/util/
DFileUtilTest.java60 File testFile = null; in testChmodGroupRW() local
66 testFile = FileUtil.createTempFile("testChmodRW", ".txt"); in testChmodGroupRW()
67 assertTrue(FileUtil.chmodGroupRW(testFile)); in testChmodGroupRW()
68 assertTrue(testFile.canRead()); in testChmodGroupRW()
69 assertTrue(testFile.canWrite()); in testChmodGroupRW()
70 assertFalse(testFile.canExecute()); in testChmodGroupRW()
72 FileUtil.deleteFile(testFile); in testChmodGroupRW()
82 File testFile = null; in testChmodGroupRW_noChmod() local
85 testFile = FileUtil.createTempFile("testChmodRW", ".txt"); in testChmodGroupRW_noChmod()
86 assertTrue(FileUtil.chmodGroupRW(testFile)); in testChmodGroupRW_noChmod()
[all …]
DTarUtilTest.java92 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUnGzip_withTargzFormat() local
93 Assert.assertTrue(testFile.exists()); in testUnGzip_withTargzFormat()
97 Assert.assertEquals(expectedName, testFile.getName()); in testUnGzip_withTargzFormat()
110 File testFile = TarUtil.unGzip(logTgzFile, mWorkDir); in testUnGzip_withTgzFormat() local
111 Assert.assertTrue(testFile.exists()); in testUnGzip_withTgzFormat()
114 Assert.assertEquals(expectedName, testFile.getName()); in testUnGzip_withTgzFormat()
127 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUntar() local
128 Assert.assertTrue(testFile.exists()); in testUntar()
129 List<File> untaredList = TarUtil.unTar(testFile, mWorkDir); in testUntar()
161 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUnTar_withFileNames() local
[all …]
DFileUtilFuncTest.java377 File testFile = FileUtil.createTempFile("test", "file", subdir1); in testRecursiveSymlink() local
381 assertNotNull(FileUtil.findFile(dest, testFile.getName())); in testRecursiveSymlink()
399 File testFile = FileUtil.createTempFile("test", "file", subdir1); in testSymlinkDeletion() local
404 assertNotNull(FileUtil.findFile(dest, testFile.getName())); in testSymlinkDeletion()
/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/
DInstallApkSetupTest.java52 private File testFile = null; field in InstallApkSetupTest
66 testFile = FileUtil.createTempFile("File", ".apk", testDir); in setUp()
78 testCollectionFiles.add(testFile); in testSetup()
79 testCollectionFiles.add(testFile); in testSetup()
95 testCollectionFiles.add(testFile); in testSetupForceQueryable()
96 testCollectionFiles.add(testFile); in testSetupForceQueryable()
115 testCollectionFiles.add(testFile); in testSetupDeviceApi34ForceQueryableIsFalse()
116 testCollectionFiles.add(testFile); in testSetupDeviceApi34ForceQueryableIsFalse()
128 testCollectionFiles.add(testFile); in testNonExistingApk()
129 FileUtil.recursiveDelete(testFile); in testNonExistingApk()
[all …]
DPushFilePreparerTest.java127 File testFile = new File(testsDir, "perf_test"); in testPushFile_RemoteIsDir() local
128 testFile.createNewFile(); in testPushFile_RemoteIsDir()
129 info.setFile("perf_test", testFile, "v1"); in testPushFile_RemoteIsDir()
132 when(mMockDevice.pushFile(Mockito.eq(testFile), Mockito.eq("/data/local/tmp/"))) in testPushFile_RemoteIsDir()
148 File testFile = new File(testsDir, "perf_test"); in testPushFile_duplicateKey() local
149 testFile.createNewFile(); in testPushFile_duplicateKey()
150 info.setFile("perf_test", testFile, "v1"); in testPushFile_duplicateKey()
155 Mockito.eq(testFile), Mockito.eq("/data/local/tmp/perf_test1"))) in testPushFile_duplicateKey()
158 Mockito.eq(testFile), Mockito.eq("/data/local/tmp/perf_test2"))) in testPushFile_duplicateKey()
174 File testFile = new File(testsDir, "perf_test"); in testPushDir_RemoteIsDir() local
[all …]
DModuleOemTargetPreparerTest.java365 for (File testFile : testFiles) { in addTestFiles()
366 mOptionSetter.setOptionValue("test-file-name", testFile.getAbsolutePath()); in addTestFiles()
/tools/tradefederation/core/javatests/com/android/tradefed/clearcut/
DClearcutClientTest.java54 File testFile = FileUtil.createTempFile("uuid-test", ""); in testGetGroupingKey() local
56 mClient.setCachedUuidFile(testFile); in testGetGroupingKey()
59 assertEquals(grouping, FileUtil.readStringFromFile(testFile)); in testGetGroupingKey()
61 FileUtil.deleteFile(testFile); in testGetGroupingKey()
67 File testFile = FileUtil.createTempFile("uuid-test", ""); in testGetGroupingKey_exists() local
69 FileUtil.writeToFile("test", testFile); in testGetGroupingKey_exists()
70 mClient.setCachedUuidFile(testFile); in testGetGroupingKey_exists()
74 FileUtil.deleteFile(testFile); in testGetGroupingKey_exists()
/tools/tradefederation/core/javatests/com/android/tradefed/config/remote/
DLocalFileResolverTest.java50 File testFile = FileUtil.createTempFile("test-local-file", ".txt"); in testResolveLocalFile() local
52 File markedFile = new File("file:" + testFile.getAbsolutePath()); in testResolveLocalFile()
56 assertEquals(testFile, returned.getResolvedFile()); in testResolveLocalFile()
58 FileUtil.deleteFile(testFile); in testResolveLocalFile()
80 File testFile = FileUtil.createTempFile("test-local-file", ".txt"); in testResolve() local
82 File markedFile = new File("file:" + testFile.getAbsolutePath()); in testResolve()
89 assertEquals(testFile.getAbsolutePath(), test.mLocalFile.getAbsolutePath()); in testResolve()
91 FileUtil.deleteFile(testFile); in testResolve()
DGcsRemoteFileResolverTest.java170 File testFile = FileUtil.createTempFile("test-resolve-file", ".txt"); in testResolve_notZip() local
175 FileUtil.hardlinkFile(testFile, destFile); in testResolve_notZip()
176 FileUtil.deleteFile(testFile); in testResolve_notZip()
194 FileUtil.deleteFile(testFile); in testResolve_notZip()
203 File testFile = FileUtil.createTempFile("test-resolve-file", ".txt"); in testResolve_notZip_parallel() local
204 FileUtil.writeToFile("some non zip content", testFile); in testResolve_notZip_parallel()
210 FileUtil.hardlinkFile(testFile, destFile); in testResolve_notZip_parallel()
211 FileUtil.deleteFile(testFile); in testResolve_notZip_parallel()
233 FileUtil.deleteFile(testFile); in testResolve_notZip_parallel()
/tools/tradefederation/core/src/com/android/tradefed/result/
DTestDescriptionsFile.java69 File testFile = File.createTempFile("testfile", ".txt"); in getFile() local
70 populateTestFile(testFile); in getFile()
84 private static void populateTestFile(List<TestDescription> tests, File testFile) { in populateTestFile() argument
87 try (BufferedWriter writer = new BufferedWriter(new FileWriter(testFile), BUFFER_SIZE)) { in populateTestFile()
133 private static void readTestsFromFile(Collection<TestDescription> tests, File testFile) { in readTestsFromFile() argument
134 try (BufferedReader reader = new BufferedReader(new FileReader(testFile), BUFFER_SIZE)) { in readTestsFromFile()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DInstrumentationFileTest.java128 File testFile = null; in writeTestsToFileAndRun() local
131 testFile = FileUtil.createTempFile( in writeTestsToFileAndRun()
133 try (BufferedWriter bw = new BufferedWriter(new FileWriter(testFile))) { in writeTestsToFileAndRun()
147 CLog.d("Test file %s was successfully created", testFile.getAbsolutePath()); in writeTestsToFileAndRun()
150 mFilePathOnDevice = ON_DEVICE_TEST_DIR_LOCATION + testFile.getName(); in writeTestsToFileAndRun()
151 if (pushFileToTestDevice(testFile, mFilePathOnDevice)) { in writeTestsToFileAndRun()
159 testFile.getAbsolutePath(), mFilePathOnDevice); in writeTestsToFileAndRun()
169 FileUtil.deleteFile(testFile); in writeTestsToFileAndRun()
DAndroidJUnitTest.java268 public void setIncludeTestFile(File testFile) { in setIncludeTestFile() argument
269 mIncludeTestFile = testFile; in setIncludeTestFile()
282 public void setExcludeTestFile(File testFile) { in setExcludeTestFile() argument
283 mExcludeTestFile = testFile; in setExcludeTestFile()
568 private void pushTestFile(File testFile, String destination, ITestInvocationListener listener) in pushTestFile() argument
570 if (!testFile.canRead() || !testFile.isFile()) { in pushTestFile()
571 String message = String.format("Cannot read test file %s", testFile.getAbsolutePath()); in pushTestFile()
579 if (!device.pushFile(testFile, destination, true)) { in pushTestFile()
583 testFile.getAbsolutePath(), destination, device.getSerialNumber()); in pushTestFile()
600 try (FileInputStreamSource source = new FileInputStreamSource(testFile)) { in pushTestFile()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/util/
DTestRunnerUtil.java49 public static String getLdLibraryPath(File testFile) { in getLdLibraryPath() argument
54 String testcasesFolderPath = getTestcasesFolderPath(testFile); in getLdLibraryPath()
56 File libFile = new File(testFile.getParentFile().getAbsolutePath(), lib); in getLdLibraryPath()
84 private static String getTestcasesFolderPath(File testFile) { in getTestcasesFolderPath() argument
87 File folder = testFile.getParentFile(); in getTestcasesFolderPath()
/tools/tradefederation/core/javatests/com/android/tradefed/build/
DBuildInfoTest.java142 File testFile = FileUtil.createTempFile("fake-versioned-file", ".txt"); in testCleanUpWithExemption() local
145 mBuildInfo.setFile("name", testFile, "version"); in testCleanUpWithExemption()
155 FileUtil.deleteFile(testFile); in testCleanUpWithExemption()
177 File testFile = FileUtil.createTempFile("fake-versioned-file", ".txt"); in testListFiles() local
180 mBuildInfo.setFile(BuildInfoFileKey.PACKAGE_FILES, testFile, "version"); in testListFiles()
187 FileUtil.deleteFile(testFile); in testListFiles()
DLocalDeviceBuildProviderTest.java178 File testFile = new File(mTestDir, "some-test"); in testSetTestsDir_givenTestDir() local
179 FileUtil.writeToFile("tests", testFile); in testSetTestsDir_givenTestDir()
184 File extractedTestFile = new File(testDir, testFile.getName()); in testSetTestsDir_givenTestDir()
186 assertTrue(FileUtil.compareFileContents(testFile, extractedTestFile)); in testSetTestsDir_givenTestDir()
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DITestFileFilterReceiver.java36 void setIncludeTestFile(File testFile); in setIncludeTestFile() argument
46 void setExcludeTestFile(File testFile); in setExcludeTestFile() argument
/tools/tradefederation/core/javatests/com/android/tradefed/device/
DTestDeviceFileFuncTest.java70 File testFile = WifiHelper.extractWifiUtilApk(); in testPushPull_Basic() local
72 mTestDevice.pushFile(testFile, deviceFilePath); in testPushPull_Basic()
77 assertEquals(computeChecksum(testFile), computeChecksum(returnedFile)); in testPushPull_Basic()
93 File testFile = WifiHelper.extractWifiUtilApk(); in testPushPull_ExtStorage() local
96 mTestDevice.pushFile(testFile, deviceFilePath); in testPushPull_ExtStorage()
101 assertEquals(computeChecksum(testFile), computeChecksum(returnedFile)); in testPushPull_ExtStorage()
/tools/metalava/metalava-model-text/src/test/java/com/android/tools/metalava/model/text/
DTextTypeParserCacheTest.kt94 val testFile = temporaryFolder.newFile("core-api-1.12.0-beta-1.txt") in <lambda>() constant
95 testFile.outputStream().use { in <lambda>()
102 listOf(SignatureFile.fromFile(testFile)), in <lambda>()
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDeviceStateMonitor.java416 final String testFile = String.format("'%s/%d'", externalStore, number); in waitForStoreMount() local
418 final String writeCmd = String.format("echo '%s' > %s", testString, testFile); in waitForStoreMount()
419 final String checkCmd = String.format("cat %s", testFile); in waitForStoreMount()
420 final String cleanupCmd = String.format("rm %s", testFile); in waitForStoreMount()
/tools/tradefederation/core/javatests/com/android/tradefed/invoker/
DShardListenerTest.java288 LogFile testFile = new LogFile("path", "url", false, LogDataType.TEXT, 0L); in testLogOrderingForSharding() local
291 .thenReturn(testFile); in testLogOrderingForSharding()
370 Mockito.eq(testFile)); in testLogOrderingForSharding()
375 inOrder.verify(mockListener).logAssociation("test-file", testFile); in testLogOrderingForSharding()
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/suite/
DSuiteModuleLoaderTest.java213 public void setIncludeTestFile(File testFile) { in setIncludeTestFile() argument
214 mIncludeTestFile = testFile; in setIncludeTestFile()
218 public void setExcludeTestFile(File testFile) { in setExcludeTestFile() argument
219 mExcludeTestFile = testFile; in setExcludeTestFile()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DInstallApexModuleTargetPreparer.java366 for (File testFile : testFiles) { in getModulesToUninstall()
367 String packageName = parsePackageName(testFile); in getModulesToUninstall()
371 filesToSkipInstall.add(testFile); in getModulesToUninstall()
/tools/metalava/metalava/src/test/java/com/android/tools/metalava/
DDriverTest.kt720 .flatMapIndexed { i, testFile -> in <lambda>() method
724 testFile.createFile(targetDir) in <lambda>()