Home
last modified time | relevance | path

Searched refs:testFile (Results 1 – 14 of 14) 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.java61 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUnGzip() local
62 Assert.assertTrue(testFile.exists()); in testUnGzip()
66 Assert.assertEquals(expectedName, testFile.getName()); in testUnGzip()
81 File testFile = TarUtil.unGzip(logTarGzFile, mWorkDir); in testUntar() local
82 Assert.assertTrue(testFile.exists()); in testUntar()
83 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/
DInstallApkSetupTest.java48 private File testFile = null; field in InstallApkSetupTest
60 testFile = FileUtil.createTempFile("File", ".apk", testDir); in setUp()
74 testCollectionFiles.add(testFile); in testSetup()
75 testCollectionFiles.add(testFile); in testSetup()
89 testCollectionFiles.add(testFile); in testNonExistingApk()
90 FileUtil.recursiveDelete(testFile); in testNonExistingApk()
97 String refMessage = String.format("%s does not exist null", testFile.getAbsolutePath()); in testNonExistingApk()
110 testCollectionFiles.add(testFile); in testInstallFailureNoThrow()
115 testFile.getAbsolutePath())).times(1); in testInstallFailureNoThrow()
127 testCollectionFiles.add(testFile); in testInstallFailureThrow()
[all …]
DPushFilePreparerTest.java118 File testFile = new File(testsDir, "perf_test"); in testPushFile_RemoteIsDir() local
119 testFile.createNewFile(); in testPushFile_RemoteIsDir()
120 info.setFile("perf_test", testFile, "v1"); in testPushFile_RemoteIsDir()
125 EasyMock.eq(testFile), EasyMock.eq("/data/local/tmp/"))) in testPushFile_RemoteIsDir()
141 File testFile = new File(testsDir, "perf_test"); in testPushDir_RemoteIsDir() local
142 testFile.mkdir(); in testPushDir_RemoteIsDir()
143 info.setFile("perf_test", testFile, "v1"); in testPushDir_RemoteIsDir()
150 EasyMock.eq(testFile), in testPushDir_RemoteIsDir()
168 File testFile = new File(testsDir, "perf_test"); in testPushDir_RemoteIsFile() local
169 testFile.mkdir(); in testPushDir_RemoteIsFile()
[all …]
/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/testtype/
DInstrumentationFileTest.java136 File testFile = null; in writeTestsToFileAndRun() local
139 testFile = FileUtil.createTempFile( in writeTestsToFileAndRun()
141 try (BufferedWriter bw = new BufferedWriter(new FileWriter(testFile))) { in writeTestsToFileAndRun()
155 CLog.d("Test file %s was successfully created", testFile.getAbsolutePath()); in writeTestsToFileAndRun()
158 mFilePathOnDevice = ON_DEVICE_TEST_DIR_LOCATION + testFile.getName(); in writeTestsToFileAndRun()
159 if (pushFileToTestDevice(testFile, mFilePathOnDevice)) { in writeTestsToFileAndRun()
167 testFile.getAbsolutePath(), mFilePathOnDevice); in writeTestsToFileAndRun()
187 FileUtil.deleteFile(testFile); in writeTestsToFileAndRun()
DAndroidJUnitTest.java250 public void setIncludeTestFile(File testFile) { in setIncludeTestFile() argument
251 mIncludeTestFile = testFile; in setIncludeTestFile()
258 public void setExcludeTestFile(File testFile) { in setExcludeTestFile() argument
259 mExcludeTestFile = testFile; in setExcludeTestFile()
469 private void pushTestFile(File testFile, String destination, ITestInvocationListener listener) in pushTestFile() argument
471 if (!testFile.canRead() || !testFile.isFile()) { in pushTestFile()
472 String message = String.format("Cannot read test file %s", testFile.getAbsolutePath()); in pushTestFile()
479 if (!device.pushFile(testFile, destination)) { in pushTestFile()
483 testFile.getAbsolutePath(), destination, device.getSerialNumber()); in pushTestFile()
DITestFileFilterReceiver.java36 void setIncludeTestFile(File testFile); in setIncludeTestFile() argument
41 void setExcludeTestFile(File testFile); in setExcludeTestFile() argument
/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/invoker/
DShardListenerTest.java176 LogFile testFile = new LogFile("path", "url", false, LogDataType.TEXT, 0L); in testLogOrderingForSharding() local
182 .andReturn(testFile); in testLogOrderingForSharding()
187 EasyMock.eq(testFile)); in testLogOrderingForSharding()
193 mockListener.logAssociation("test-file", testFile); in testLogOrderingForSharding()
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDeviceStateMonitor.java287 final String testFile = String.format("'%s/%d'", externalStore, number); in waitForStoreMount() local
289 final String writeCmd = String.format("echo '%s' > %s", testString, testFile); in waitForStoreMount()
290 final String checkCmd = String.format("cat %s", testFile); in waitForStoreMount()
291 final String cleanupCmd = String.format("rm %s", testFile); in waitForStoreMount()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DTestDeviceFuncTest.java837 File testFile = FileUtil.createTempFile("test-screenshot", ".testpng"); in testScreenshot() local
839 FileUtil.writeToFile(screenshot.createInputStream(), testFile); in testScreenshot() local
840 assertEquals("image/png", Files.probeContentType(testFile.toPath())); in testScreenshot()
842 FileUtil.deleteFile(testFile); in testScreenshot()