/tools/tradefederation/core/util-apps/ContentProvider/hostsidetests/src/com/android/tradefed/contentprovider/ |
D | ContentProviderTest.java | 68 File tmpFile = FileUtil.createTempFile("tmpFileToPush (test)", ".txt"); in testPushFile_encode() local 70 boolean res = mHandler.pushFile(tmpFile, "/sdcard/" + tmpFile.getName()); in testPushFile_encode() 72 assertTrue(getDevice().doesFileExist(mCurrentUserStoragePath + tmpFile.getName())); in testPushFile_encode() 74 FileUtil.deleteFile(tmpFile); in testPushFile_encode() 85 File tmpFile = FileUtil.createTempFile("tmpFileToPush+(test)", ".txt"); in testPushFile_encode_plus() local 87 boolean res = mHandler.pushFile(tmpFile, "/sdcard/" + tmpFile.getName()); in testPushFile_encode_plus() 89 assertTrue(getDevice().doesFileExist(mCurrentUserStoragePath + tmpFile.getName())); in testPushFile_encode_plus() 91 FileUtil.deleteFile(tmpFile); in testPushFile_encode_plus() 97 File tmpFile = FileUtil.createTempFile("tmpFileToPush", ".txt"); in testPushFile() local 99 String devicePath = "/sdcard/" + tmpFile.getName(); in testPushFile() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | FileUtilFuncTest.java | 118 File tmpFile = createTempFile("foo", "txt"); in testChmodGroupRW() local 119 tmpFile.setReadable(false); in testChmodGroupRW() 120 tmpFile.setWritable(false); in testChmodGroupRW() 121 FileUtil.chmodGroupRW(tmpFile); in testChmodGroupRW() 122 assertTrue(tmpFile.canRead()); in testChmodGroupRW() 123 assertTrue(tmpFile.canWrite()); in testChmodGroupRW() 147 File tmpFile = createTempFile("foo", ".txt"); in testCreateTempFile() local 148 assertTrue(tmpFile.exists()); in testCreateTempFile() 149 assertTrue(tmpFile.isFile()); in testCreateTempFile() 150 assertTrue(tmpFile.getName().startsWith("foo")); in testCreateTempFile() [all …]
|
D | TarUtilTest.java | 57 File tmpFile = FileUtil.createTempFile("log_tarutil_test", ".tar.gz"); in testIsGzip() local 59 FileUtil.writeToFile(logTarGz, tmpFile); in testIsGzip() 60 assertTrue(TarUtil.isGzip(tmpFile)); in testIsGzip() 62 FileUtil.writeToFile("test", tmpFile); in testIsGzip() 63 assertFalse(TarUtil.isGzip(tmpFile)); in testIsGzip() 65 FileUtil.writeToFile("", tmpFile); in testIsGzip() 66 assertFalse(TarUtil.isGzip(tmpFile)); in testIsGzip() 68 FileUtil.deleteFile(tmpFile); in testIsGzip() 163 File tmpFile = FileUtil.createTempFile("base_file", ".txt", mWorkDir); in testGzipDir_unGzip() local 167 FileUtil.writeToFile(content, tmpFile); in testGzipDir_unGzip() [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 | FileUtilTest.java | 541 File tmpFile = FileUtil.createTempFile("test", ".txt"); in testReadPartialStringFromFile() local 552 FileUtil.writeToFile(content.toString(), tmpFile); in testReadPartialStringFromFile() local 554 assertEquals(content.toString(), FileUtil.readStringFromFile(tmpFile, -1024, 4096 * 2)); in testReadPartialStringFromFile() 557 partialContent.toString(), FileUtil.readStringFromFile(tmpFile, 1024, 4096)); in testReadPartialStringFromFile() 559 FileUtil.deleteFile(tmpFile); in testReadPartialStringFromFile()
|
D | GCSFileDownloaderFuncTest.java | 89 File tmpFile = in setUp() 91 tmpFile.delete(); in setUp() 92 return tmpFile; in setUp()
|
D | ZipUtilTest.java | 194 File tmpFile = FileUtil.createTempFile("ziputiltest", ".zip"); in testExtractZipToTemp() local 196 ZipUtil.extractZipToTemp(tmpFile, "testExtractZipToTemp"); in testExtractZipToTemp() 201 FileUtil.deleteFile(tmpFile); in testExtractZipToTemp()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | AppSetupTest.java | 70 File tmpFile = FileUtil.createTempFile("versioned", ".test"); in setUp() local 71 mApps.add(new VersionedFile(tmpFile, "1")); in setUp() 108 File tmpFile = FileUtil.createTempFile("versioned", ".test"); in testSetup_failToInstall() local 110 files.add(new VersionedFile(tmpFile, "1")); in testSetup_failToInstall() 112 EasyMock.expect(mMockDevice.installPackage(EasyMock.eq(tmpFile), EasyMock.eq(true))) in testSetup_failToInstall() 119 tmpFile.getName(), SERIAL), expected.getMessage()); in testSetup_failToInstall() 121 FileUtil.deleteFile(tmpFile); in testSetup_failToInstall() 133 File tmpFile = FileUtil.createTempFile("versioned", ".test"); in testSetup_aaptCannotParse() local 135 files.add(new VersionedFile(tmpFile, "1")); in testSetup_aaptCannotParse() 137 EasyMock.expect(mMockDevice.installPackage(EasyMock.eq(tmpFile), EasyMock.eq(true))) in testSetup_aaptCannotParse() [all …]
|
D | GkiDeviceFlashPreparerTest.java | 183 File tmpFile = new File(otaDir, "test"); in testValidateGkiBootImg_NoMkbootimgInOtatoolsZip() local 185 ZipUtil.createZip(List.of(tmpFile), otatoolsZip); in testValidateGkiBootImg_NoMkbootimgInOtatoolsZip() 260 File tmpFile = new File(otaDir, "test"); in testSetUp_NoMkbootimgInOtatoolsZip() local 262 ZipUtil.createZip(List.of(tmpFile), otatoolsZip); in testSetUp_NoMkbootimgInOtatoolsZip()
|
D | GsiDeviceFlashPreparerTest.java | 167 File tmpFile = new File(gsiDir, "test"); in testSetUp_NoSystemImageInGsiZip() local 169 ZipUtil.createZip(List.of(tmpFile), gsiZip); in testSetUp_NoSystemImageInGsiZip()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | TestDeviceFuncTest.java | 159 File tmpFile = WifiHelper.extractWifiUtilApk(); in testInstallUninstall() local 161 assertWifiApkInstall(tmpFile); in testInstallUninstall() 163 FileUtil.deleteFile(tmpFile); in testInstallUninstall() 170 void assertWifiApkInstall(File tmpFile) throws DeviceNotAvailableException { in assertWifiApkInstall() argument 175 assertNull(mTestDevice.installPackage(tmpFile, false)); in assertWifiApkInstall() 180 tmpFile.getName()))); in assertWifiApkInstall() 182 FileUtil.deleteFile(tmpFile); in assertWifiApkInstall() 191 File tmpFile = WifiHelper.extractWifiUtilApk(); in testInstallUninstall_space() local 195 FileUtil.copyFile(tmpFile, tmpFileSpaces); in testInstallUninstall_space() 198 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 | 2099 File tmpFile = FileUtil.createTempFile("pull", ".test"); in testPullFile() local 2101 boolean res = mTestDevice.pullFile(fakeRemotePath, tmpFile); in testPullFile() 2106 Mockito.eq(tmpFile.getAbsolutePath()), in testPullFile() 2111 FileUtil.deleteFile(tmpFile); in testPullFile() 2125 File tmpFile = FileUtil.createTempFile("pull", ".test"); in testPullFile_fails() local 2130 Mockito.eq(tmpFile.getAbsolutePath()), in testPullFile_fails() 2133 boolean res = mTestDevice.pullFile(fakeRemotePath, tmpFile); in testPullFile_fails() 2138 Mockito.eq(tmpFile.getAbsolutePath()), in testPullFile_fails() 2143 FileUtil.deleteFile(tmpFile); in testPullFile_fails() 2235 File tmpFile = FileUtil.createTempFile("push", ".test"); in testPushFile() local [all …]
|
D | TestDeviceTest.java | 4786 File tmpFile = FileUtil.createTempFile("push", ".test"); in testPushFile_contentProvider() local 4805 boolean res = spy.pushFile(tmpFile, fakeRemotePath); in testPushFile_contentProvider() 4817 FileUtil.deleteFile(tmpFile); in testPushFile_contentProvider() 4844 File tmpFile = FileUtil.createTempFile("push", ".test"); in testPushFile_contentProvider_notFound() local 4866 boolean res = spy.pushFile(tmpFile, fakeRemotePath); in testPushFile_contentProvider_notFound() 4878 FileUtil.deleteFile(tmpFile); in testPushFile_contentProvider_notFound()
|
/tools/tradefederation/core/src/com/android/tradefed/result/proto/ |
D | FileProtoResultReporter.java | 100 File tmpFile = null; in writeProto() local 102 tmpFile = FileUtil.createTempFile("tmp-proto", "", mOutputFile.getParentFile()); in writeProto() 108 output = new FileOutputStream(tmpFile); in writeProto() 118 tmpFile.renameTo(outputFile); in writeProto()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | PerfettoPullerMetricCollectorTest.java | 249 File tmpFile = File.createTempFile("trace_processor_shell", ""); in testTraceProcessorArgsDefaults() local 252 Mockito.doReturn(tmpFile).when( in testTraceProcessorArgsDefaults() 260 String path = tmpFile.getAbsolutePath(); in testTraceProcessorArgsDefaults() 261 tmpFile.delete(); in testTraceProcessorArgsDefaults() 281 File tmpFile = File.createTempFile("trace_processor_binary", ""); in testTraceProcessorAdditionalArgs() local 286 setter.setOptionValue("trace-processor-binary", tmpFile.getAbsolutePath()); in testTraceProcessorAdditionalArgs() 304 tmpFile.delete(); in testTraceProcessorAdditionalArgs() 313 Assert.assertTrue(args.contains(tmpFile.getAbsolutePath())); in testTraceProcessorAdditionalArgs()
|
/tools/tradefederation/core/src/com/android/tradefed/result/ |
D | SubprocessResultsReporter.java | 216 File tmpFile = null; in testLog() local 219 tmpFile = in testLog() 222 FileUtil.writeToFile(dataStream.createInputStream(), tmpFile); in testLog() local 223 TestLogEventInfo info = new TestLogEventInfo(dataName, dataType, tmpFile); in testLog() 227 FileUtil.deleteFile(tmpFile); in testLog()
|
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/metric/ |
D | GameQualificationFpsCollector.java | 264 File tmpFile = File.createTempFile("GameQualification-frametimes", ".txt"); in doEnd() local 265 try (BufferedWriter outputFile = new BufferedWriter(new FileWriter(tmpFile))) { in doEnd() 309 try(InputStreamSource source = new FileInputStreamSource(tmpFile, true)) { in doEnd() 313 tmpFile.delete(); in doEnd()
|
/tools/loganalysis/tests/src/com/android/loganalysis/util/config/ |
D | OptionSetterTest.java | 690 File tmpFile = File.createTempFile("testSetOptionValue_file", "txt"); in testSetOptionValue_file() local 692 assertSetOptionValue(optionSource, "file", tmpFile.getAbsolutePath()); in testSetOptionValue_file() 693 assertEquals(tmpFile.getAbsolutePath(), optionSource.mFile.getAbsolutePath()); in testSetOptionValue_file() 695 tmpFile.delete(); in testSetOptionValue_file()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | GCSFileDownloader.java | 381 File tmpFile = FileUtil.createTempFileForRemote(remoteFilePath, rootDir); in createTempFile() local 383 tmpFile.delete(); in createTempFile() 384 return tmpFile; in createTempFile()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/config/ |
D | ConfigurationFactoryTest.java | 260 File tmpFile = FileUtil.createTempFile(TEST_CONFIG, ".xml"); in testGetConfiguration_xmlpath() local 262 FileUtil.writeToFile(configStream, tmpFile); in testGetConfiguration_xmlpath() 263 assertConfigValid(tmpFile.getAbsolutePath()); in testGetConfiguration_xmlpath() 265 assertConfigValid(tmpFile.getAbsolutePath()); in testGetConfiguration_xmlpath() 267 FileUtil.deleteFile(tmpFile); in testGetConfiguration_xmlpath() 285 File tmpFile = FileUtil.createTempFile(GLOBAL_TEST_CONFIG, ".xml"); in testGetGlobalConfiguration_xmlpath() local 287 FileUtil.writeToFile(configStream, tmpFile); in testGetGlobalConfiguration_xmlpath() 288 assertGlobalConfigValid(tmpFile.getAbsolutePath()); in testGetGlobalConfiguration_xmlpath() 290 assertGlobalConfigValid(tmpFile.getAbsolutePath()); in testGetGlobalConfiguration_xmlpath() 292 FileUtil.deleteFile(tmpFile); in testGetGlobalConfiguration_xmlpath()
|
D | OptionSetterTest.java | 887 File tmpFile = FileUtil.createTempFile("testSetOptionValue_file", "txt"); in testSetOptionValue_file() local 889 assertSetOptionValue(optionSource, "file", tmpFile.getAbsolutePath()); in testSetOptionValue_file() 890 assertEquals(tmpFile.getAbsolutePath(), optionSource.mFile.getAbsolutePath()); in testSetOptionValue_file() 892 FileUtil.deleteFile(tmpFile); in testSetOptionValue_file()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | SandboxedInvocationExecutionTest.java | 406 File tmpFile = FileUtil.createTempFile("sandboxedTest", "test"); in testBackFill() local 408 info.setFile("random-key", tmpFile, "1"); in testBackFill() 424 FileUtil.deleteFile(tmpFile); in testBackFill()
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | FileUtil.java | 796 File tmpFile = FileUtil.createTempFile(prefix + "_", fileExt, parentDir); in createTempFileForRemote() local 797 return tmpFile; in createTempFileForRemote()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | NativeDevice.java | 1259 File tmpFile = null; in pushString() local 1261 tmpFile = FileUtil.createTempFile("temp", ".txt"); in pushString() 1262 FileUtil.writeToFile(contents, tmpFile); in pushString() 1263 return pushFile(tmpFile, remoteFilePath); in pushString() 1268 FileUtil.deleteFile(tmpFile); in pushString()
|