/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | FileUtilFuncTest.java | 109 File tmpFile = createTempFile("foo", "txt"); in testChmodGroupRW() local 110 tmpFile.setReadable(false); in testChmodGroupRW() 111 tmpFile.setWritable(false); in testChmodGroupRW() 112 FileUtil.chmodGroupRW(tmpFile); in testChmodGroupRW() 113 assertTrue(tmpFile.canRead()); in testChmodGroupRW() 114 assertTrue(tmpFile.canWrite()); in testChmodGroupRW() 141 File tmpFile = createTempFile("foo", ".txt"); in testCreateTempFile() local 142 assertTrue(tmpFile.exists()); in testCreateTempFile() 143 assertTrue(tmpFile.isFile()); in testCreateTempFile() 144 assertTrue(tmpFile.getName().startsWith("foo")); in testCreateTempFile() [all …]
|
D | ZipUtil2Test.java | 111 File tmpFile = FileUtil.createTempFile("ziputiltest", ".zip"); in testExtractZipToTemp() local 113 ZipUtil2.extractZipToTemp(tmpFile, "testExtractZipToTemp"); in testExtractZipToTemp() 118 FileUtil.deleteFile(tmpFile); in testExtractZipToTemp()
|
D | TarUtilTest.java | 125 File tmpFile = FileUtil.createTempFile("base_file", ".txt", mWorkDir); in testGzipDir_unGzip() local 129 FileUtil.writeToFile(content, tmpFile); in testGzipDir_unGzip() 130 zipped = TarUtil.gzip(tmpFile); in testGzipDir_unGzip()
|
D | ZipUtilTest.java | 183 File tmpFile = FileUtil.createTempFile("ziputiltest", ".zip"); in testExtractZipToTemp() local 185 ZipUtil.extractZipToTemp(tmpFile, "testExtractZipToTemp"); in testExtractZipToTemp() 190 FileUtil.deleteFile(tmpFile); in testExtractZipToTemp()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | AppSetupTest.java | 100 File tmpFile = FileUtil.createTempFile("versioned", ".test"); in testSetup_failToInstall() local 102 files.add(new VersionedFile(tmpFile, "1")); in testSetup_failToInstall() 104 EasyMock.expect(mMockDevice.installPackage(EasyMock.eq(tmpFile), EasyMock.eq(true))) in testSetup_failToInstall() 111 tmpFile.getName(), SERIAL), expected.getMessage()); in testSetup_failToInstall() 113 FileUtil.deleteFile(tmpFile); in testSetup_failToInstall() 125 File tmpFile = FileUtil.createTempFile("versioned", ".test"); in testSetup_aaptCannotParse() local 127 files.add(new VersionedFile(tmpFile, "1")); in testSetup_aaptCannotParse() 129 EasyMock.expect(mMockDevice.installPackage(EasyMock.eq(tmpFile), EasyMock.eq(true))) in testSetup_aaptCannotParse() 136 tmpFile.getAbsolutePath()), expected.getMessage()); in testSetup_aaptCannotParse() 138 FileUtil.deleteFile(tmpFile); in testSetup_aaptCannotParse() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | TestDeviceFuncTest.java | 153 File tmpFile = WifiHelper.extractWifiUtilApk(); in testInstallUninstall() local 155 assertWifiApkInstall(tmpFile); in testInstallUninstall() 157 FileUtil.deleteFile(tmpFile); in testInstallUninstall() 164 void assertWifiApkInstall(File tmpFile) throws DeviceNotAvailableException { in assertWifiApkInstall() argument 169 assertNull(mTestDevice.installPackage(tmpFile, false)); in assertWifiApkInstall() 174 tmpFile.getName()))); in assertWifiApkInstall() 176 FileUtil.deleteFile(tmpFile); in assertWifiApkInstall() 185 File tmpFile = WifiHelper.extractWifiUtilApk(); in testInstallUninstall_space() local 189 FileUtil.copyFile(tmpFile, tmpFileSpaces); in testInstallUninstall_space() 192 FileUtil.deleteFile(tmpFile); in testInstallUninstall_space() [all …]
|
D | TestDeviceStressTest.java | 60 File tmpFile = null; in createTempTestFiles() local 66 tmpFile = FileUtil.createTempFile(String.format("tmp_%d", i), ".txt", tmpDir); in createTempTestFiles() 67 FileUtil.writeToFile(fileContents, tmpFile); in createTempTestFiles()
|
D | NativeDeviceTest.java | 1876 File tmpFile = FileUtil.createTempFile("pull", ".test"); in testPullFile() local 1878 boolean res = mTestDevice.pullFile(fakeRemotePath, tmpFile); in testPullFile() 1883 Mockito.eq(tmpFile.getAbsolutePath()), in testPullFile() 1888 FileUtil.deleteFile(tmpFile); in testPullFile() 1901 File tmpFile = FileUtil.createTempFile("pull", ".test"); in testPullFile_fails() local 1906 Mockito.eq(tmpFile.getAbsolutePath()), in testPullFile_fails() 1909 boolean res = mTestDevice.pullFile(fakeRemotePath, tmpFile); in testPullFile_fails() 1914 Mockito.eq(tmpFile.getAbsolutePath()), in testPullFile_fails() 1919 FileUtil.deleteFile(tmpFile); in testPullFile_fails() 2007 File tmpFile = FileUtil.createTempFile("push", ".test"); in testPushFile() local [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/ |
D | VerifyTest.java | 51 File tmpFile = FileUtil.createTempFile(tmpFileName, ".txt"); in extractTestCmdFile() local 53 FileUtil.writeToFile(cmdFileStream, tmpFile); in extractTestCmdFile() 56 FileUtil.deleteFile(tmpFile); in extractTestCmdFile() 60 return tmpFile; in extractTestCmdFile()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/xml/ |
D | AndroidManifestWriterTest.java | 88 File tmpFile = FileUtil.createTempFile(fileName, ".xml"); in extractTestXml() local 89 FileUtil.writeToFile(testStream, tmpFile); in extractTestXml() 90 return tmpFile; in extractTestXml()
|
/tools/tradefederation/core/src/com/android/tradefed/result/ |
D | SubprocessResultsReporter.java | 173 File tmpFile = null; in testLog() local 176 tmpFile = in testLog() 179 FileUtil.writeToFile(dataStream.createInputStream(), tmpFile); in testLog() local 180 TestLogEventInfo info = new TestLogEventInfo(dataName, dataType, tmpFile); in testLog() 184 FileUtil.deleteFile(tmpFile); in testLog()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | AndroidJUnitTestTest.java | 206 File tmpFile = FileUtil.createTempFile("testFile", ".txt"); in testRun_includeFile() local 208 mAndroidJUnitTest.setIncludeTestFile(tmpFile); in testRun_includeFile() 212 FileUtil.deleteFile(tmpFile); in testRun_includeFile() 231 File tmpFile = FileUtil.createTempFile("notTestFile", ".txt"); in testRun_excludeFile() local 233 mAndroidJUnitTest.setExcludeTestFile(tmpFile); in testRun_excludeFile() 237 FileUtil.deleteFile(tmpFile); in testRun_excludeFile()
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/testdefs/ |
D | XmlDefsTest.java | 323 File tmpFile = FileUtil.createTempFile("test_defs_", ".xml"); in getRemoteFile() local 324 getDevice().pullFile(remoteFilePath, tmpFile); in getRemoteFile() 325 files.add(tmpFile); in getRemoteFile()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/config/ |
D | ConfigurationFactoryTest.java | 213 File tmpFile = FileUtil.createTempFile(TEST_CONFIG, ".xml"); in testGetConfiguration_xmlpath() local 215 FileUtil.writeToFile(configStream, tmpFile); in testGetConfiguration_xmlpath() 216 assertConfigValid(tmpFile.getAbsolutePath()); in testGetConfiguration_xmlpath() 218 assertConfigValid(tmpFile.getAbsolutePath()); in testGetConfiguration_xmlpath() 220 FileUtil.deleteFile(tmpFile); in testGetConfiguration_xmlpath() 238 File tmpFile = FileUtil.createTempFile(GLOBAL_TEST_CONFIG, ".xml"); in testGetGlobalConfiguration_xmlpath() local 240 FileUtil.writeToFile(configStream, tmpFile); in testGetGlobalConfiguration_xmlpath() 241 assertGlobalConfigValid(tmpFile.getAbsolutePath()); in testGetGlobalConfiguration_xmlpath() 243 assertGlobalConfigValid(tmpFile.getAbsolutePath()); in testGetGlobalConfiguration_xmlpath() 245 FileUtil.deleteFile(tmpFile); in testGetGlobalConfiguration_xmlpath()
|
D | OptionSetterTest.java | 838 File tmpFile = FileUtil.createTempFile("testSetOptionValue_file", "txt"); in testSetOptionValue_file() local 840 assertSetOptionValue(optionSource, "file", tmpFile.getAbsolutePath()); in testSetOptionValue_file() 841 assertEquals(tmpFile.getAbsolutePath(), optionSource.mFile.getAbsolutePath()); in testSetOptionValue_file() 843 FileUtil.deleteFile(tmpFile); in testSetOptionValue_file()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | NativeDevice.java | 1048 File tmpFile = null; in pushString() local 1050 tmpFile = FileUtil.createTempFile("temp", ".txt"); in pushString() 1051 FileUtil.writeToFile(contents, tmpFile); in pushString() 1052 return pushFile(tmpFile, remoteFilePath); in pushString() 1057 FileUtil.deleteFile(tmpFile); in pushString()
|