Home
last modified time | relevance | path

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

/tools/tradefederation/core/tests/src/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.java81 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUnGzip() local
82 Assert.assertTrue(testFile.exists()); in testUnGzip()
86 Assert.assertEquals(expectedName, testFile.getName()); in testUnGzip()
101 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUntar() local
102 Assert.assertTrue(testFile.exists()); in testUntar()
103 List<File> untaredList = TarUtil.unTar(testFile, mWorkDir); in testUntar()
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/tests/src/com/android/tradefed/targetprep/
DPushFilePreparerTest.java124 File testFile = new File(testsDir, "perf_test"); in testPushFile_RemoteIsDir() local
125 testFile.createNewFile(); in testPushFile_RemoteIsDir()
126 info.setFile("perf_test", testFile, "v1"); in testPushFile_RemoteIsDir()
131 EasyMock.eq(testFile), EasyMock.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()
156 EasyMock.eq(testFile), in testPushFile_duplicateKey()
161 EasyMock.eq(testFile), in testPushFile_duplicateKey()
179 File testFile = new File(testsDir, "perf_test"); in testPushDir_RemoteIsDir() local
[all …]
DInstallApkSetupTest.java49 private File testFile = null; field in InstallApkSetupTest
62 testFile = FileUtil.createTempFile("File", ".apk", testDir); in setUp()
76 testCollectionFiles.add(testFile); in testSetup()
77 testCollectionFiles.add(testFile); in testSetup()
94 testCollectionFiles.add(testFile); in testSetupForceQueryable()
95 testCollectionFiles.add(testFile); in testSetupForceQueryable()
109 testCollectionFiles.add(testFile); in testNonExistingApk()
110 FileUtil.recursiveDelete(testFile); in testNonExistingApk()
117 String refMessage = String.format("%s does not exist", testFile.getAbsolutePath()); in testNonExistingApk()
130 testCollectionFiles.add(testFile); in testInstallFailureNoThrow()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DAndroidJUnitTest.java243 public void setIncludeTestFile(File testFile) { in setIncludeTestFile() argument
244 mIncludeTestFile = testFile; in setIncludeTestFile()
251 public void setExcludeTestFile(File testFile) { in setExcludeTestFile() argument
252 mExcludeTestFile = testFile; in setExcludeTestFile()
441 private void pushTestFile(File testFile, String destination, ITestInvocationListener listener) in pushTestFile() argument
443 if (!testFile.canRead() || !testFile.isFile()) { in pushTestFile()
444 String message = String.format("Cannot read test file %s", testFile.getAbsolutePath()); in pushTestFile()
451 if (!device.pushFile(testFile, destination)) { in pushTestFile()
455 testFile.getAbsolutePath(), destination, device.getSerialNumber()); in pushTestFile()
DInstrumentationFileTest.java138 File testFile = null; in writeTestsToFileAndRun() local
141 testFile = FileUtil.createTempFile( in writeTestsToFileAndRun()
143 try (BufferedWriter bw = new BufferedWriter(new FileWriter(testFile))) { in writeTestsToFileAndRun()
157 CLog.d("Test file %s was successfully created", testFile.getAbsolutePath()); in writeTestsToFileAndRun()
160 mFilePathOnDevice = ON_DEVICE_TEST_DIR_LOCATION + testFile.getName(); in writeTestsToFileAndRun()
161 if (pushFileToTestDevice(testFile, mFilePathOnDevice)) { in writeTestsToFileAndRun()
169 testFile.getAbsolutePath(), mFilePathOnDevice); in writeTestsToFileAndRun()
189 FileUtil.deleteFile(testFile); in writeTestsToFileAndRun()
/tools/tradefederation/core/tests/src/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/src/com/android/tradefed/result/
DTestDescriptionsFile.java69 File testFile = File.createTempFile("testfile", ".txt"); in getFile() local
70 populateTestFile(testFile); in getFile()
120 private static void readTestsFromFile(Collection<TestDescription> tests, File testFile) { in readTestsFromFile() argument
121 try (BufferedReader reader = new BufferedReader(new FileReader(testFile), BUFFER_SIZE)) { in readTestsFromFile()
134 private static void populateTestFile(List<TestDescription> tests, File testFile) { in populateTestFile() argument
137 try (BufferedWriter writer = new BufferedWriter(new FileWriter(testFile), BUFFER_SIZE)) { in populateTestFile()
/tools/tradefederation/core/tests/src/com/android/tradefed/build/
DBuildInfoTest.java134 File testFile = FileUtil.createTempFile("fake-versioned-file", ".txt"); in testCleanUpWithExemption() local
137 mBuildInfo.setFile("name", testFile, "version"); in testCleanUpWithExemption()
147 FileUtil.deleteFile(testFile); in testCleanUpWithExemption()
169 File testFile = FileUtil.createTempFile("fake-versioned-file", ".txt"); in testListFiles() local
172 mBuildInfo.setFile(BuildInfoFileKey.PACKAGE_FILES, testFile, "version"); in testListFiles()
179 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/tests/src/com/android/tradefed/config/remote/
DLocalFileResolverTest.java44 File testFile = FileUtil.createTempFile("test-local-file", ".txt"); in testResolveLocalFile() local
46 File markedFile = new File("file:" + testFile.getAbsolutePath()); in testResolveLocalFile()
48 assertEquals(testFile, returned); in testResolveLocalFile()
50 FileUtil.deleteFile(testFile); in testResolveLocalFile()
DGcsRemoteFileResolverTest.java111 File testFile = FileUtil.createTempFile("test-resolve-file", ".txt"); in testResolve_notZip() local
113 Mockito.doReturn(testFile).when(mMockHelper).fetchTestResource("gs:/fake/file"); in testResolve_notZip()
118 assertEquals(testFile, resolvedFile); in testResolve_notZip()
122 FileUtil.deleteFile(testFile); in testResolve_notZip()
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDeviceStateMonitor.java305 final String testFile = String.format("'%s/%d'", externalStore, number); in waitForStoreMount() local
307 final String writeCmd = String.format("echo '%s' > %s", testString, testFile); in waitForStoreMount()
308 final String checkCmd = String.format("cat %s", testFile); in waitForStoreMount()
309 final String cleanupCmd = String.format("rm %s", testFile); in waitForStoreMount()
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/
DShardListenerTest.java256 LogFile testFile = new LogFile("path", "url", false, LogDataType.TEXT, 0L); in testLogOrderingForSharding() local
262 .andReturn(testFile); in testLogOrderingForSharding()
267 EasyMock.eq(testFile)); in testLogOrderingForSharding()
274 mockListener.logAssociation("test-file", testFile); in testLogOrderingForSharding()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DSuiteModuleLoaderTest.java173 public void setIncludeTestFile(File testFile) { in setIncludeTestFile() argument
174 mIncludeTestFile = testFile; in setIncludeTestFile()
178 public void setExcludeTestFile(File testFile) { in setExcludeTestFile() argument
179 mExcludeTestFile = testFile; in setExcludeTestFile()
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DITestFileFilterReceiver.java36 void setIncludeTestFile(File testFile); in setIncludeTestFile() argument
41 void setExcludeTestFile(File testFile); in setExcludeTestFile() argument