/tools/repohooks/tools/ |
D | android_test_mapping_format_unittest.py | 200 with open(self.test_mapping_file, 'w') as f: 201 f.write(VALID_TEST_MAPPING) 202 with open(self.test_mapping_file, 'r') as f: 203 android_test_mapping_format.process_file(f.read()) 207 with open(self.test_mapping_file, 'w') as f: 208 f.write(BAD_JSON) 209 with open(self.test_mapping_file, 'r') as f: 212 f.read()) 216 with open(self.test_mapping_file, 'w') as f: 217 f.write(BAD_TEST_WRONG_KEY) [all …]
|
D | checkpatch.pl | 162 if (-f $conf) { 815 return if (!(-f $file)); 874 if ($camelcase_cache ne "" && -f $camelcase_cache) { 2123 if (-f "$root/$file") { 2128 if (! -f _) { 2834 my $f; 2838 $f = $lines[$ln - 1]; 2842 next if ($f =~ /^-/); 2843 last if (!$file && $f =~ /^\@\@/); 2855 $f =~ s/^.//; [all …]
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/utils/ |
D | CachedFileContentsTest.java | 37 File f = mTemporaryFolder.newFile("test"); in createFileAndCheckWithNoChanges() local 38 Files.write("abc", f, Charsets.US_ASCII); in createFileAndCheckWithNoChanges() 42 CachedFileContents<Object> cachedFile = new CachedFileContents<>(f); in createFileAndCheckWithNoChanges() 51 File f = mTemporaryFolder.newFile("test"); in createFileAndCheckChanges() local 52 Files.write("abc", f, Charsets.US_ASCII); in createFileAndCheckChanges() 56 CachedFileContents<Object> cachedFile = new CachedFileContents<>(f); in createFileAndCheckChanges() 59 Files.write("def", f, Charsets.US_ASCII); in createFileAndCheckChanges() 67 File f = mTemporaryFolder.newFile("test"); in createFileUpdateAndCheckChanges() local 68 Files.write("abc", f, Charsets.US_ASCII); in createFileUpdateAndCheckChanges() 72 CachedFileContents<Object> cachedFile = new CachedFileContents<>(f); in createFileUpdateAndCheckChanges() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/retry/ |
D | RetryReschedulerTest.java | 608 for (int f = 0; f < failedTests; f++) { in populateFakeResults() 609 TestDescription test = new TestDescription("test.class", "testFail" + f); in populateFakeResults() 611 reporter.testFailed(test, "failure" + f); in populateFakeResults() 614 for (int f = 0; f < parameterized; f++) { in populateFakeResults() 617 new TestDescription("test.class", "parameterized" + f + "[0]"); in populateFakeResults() 620 reporter.testFailed(test, "parameterized" + f); in populateFakeResults() 625 new TestDescription("test.class", "parameterized" + f + "[1]"); in populateFakeResults() 629 for (int f = 0; f < assumpFailure; f++) { in populateFakeResults() 630 TestDescription test = new TestDescription("test.class", "testAssume" + f); in populateFakeResults() 632 reporter.testAssumptionFailure(test, "assume" + f); in populateFakeResults()
|
/tools/test/connectivity/acts_tests/tests/google/tel/etc/ |
D | manage_sim.py | 96 f = open(sim_card_file, 'r') 97 simconf = json.load(f) 98 f.close() 126 f = open(sim_card_file, 'w') 127 json.dump(simconf, f, indent=4, sort_keys=True) 128 f.close() 134 f = open(sim_card_file, 'r') 135 simconf = json.load(f) 136 f.close() 160 f = open(sim_card_file, 'w') [all …]
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSinkFromRAFTest.java | 37 RandomAccessFile f = null; in createDataSink() local 39 f = new RandomAccessFile(tmp, "rw"); in createDataSink() 41 if (f == null) { in createDataSink() 46 (RandomAccessFileDataSink) DataSinks.asDataSink(f), in createDataSink() 47 new DataSourceFromRAFTest.TmpFileCloseable(tmp, f)); in createDataSink() 52 RandomAccessFile f = dataSink.getFile(); in getContents() local 53 if (f.length() > Integer.MAX_VALUE) { in getContents() 54 throw new IOException("File too large: " + f.length()); in getContents() 56 byte[] contents = new byte[(int) f.length()]; in getContents() 57 f.seek(0); in getContents() [all …]
|
D | DataSourceFromRAFChunkTest.java | 49 File f = ((TmpFileCloseable) c.getCloseable()).getFile(); in testFileSizeChangesNotVisible() local 58 try (RandomAccessFile raf = new RandomAccessFile(f, "rw")) { in testFileSizeChangesNotVisible() 82 RandomAccessFile f = null; in createDataSource() local 85 f = new RandomAccessFile(tmp, "r"); in createDataSource() 87 if (f == null) { in createDataSource() 93 factory.create(f, 2, contents.length), in createDataSource() 94 new DataSourceFromRAFTest.TmpFileCloseable(tmp, f)); in createDataSource()
|
D | DataSourceFromRAFTest.java | 51 File f = ((TmpFileCloseable) c.getCloseable()).getFile(); in testFileSizeChangesVisible() local 60 try (RandomAccessFile raf = new RandomAccessFile(f, "rw")) { in testFileSizeChangesVisible() 78 RandomAccessFile f = null; in createDataSource() local 81 f = new RandomAccessFile(tmp, "r"); in createDataSource() 83 if (f == null) { in createDataSource() 89 factory.create(f), in createDataSource() 90 new TmpFileCloseable(tmp, f)); in createDataSource()
|
/tools/test/connectivity/acts/framework/acts/test_utils/audio_analysis_lib/ |
D | check_quality.py | 242 spectral = [(f, c) for (f, c) in spectral if f < ignore_high_freq] 345 with open(output_file, 'w') as f: 346 json.dump(dump_dict, f) 420 with open(output_file, 'w') as f: 421 json.dump(dump_dict, f) 451 with open(filename, 'rb') as f: 452 binary = f.read()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | HprofAllocSiteParserTest.java | 67 File f = FileUtil.createTempFile("hprof", ".test"); in testParse() local 69 FileUtil.writeToFile(TEST_STRING, f); in testParse() 70 Map<String, String> results = mParser.parse(f); in testParse() 75 FileUtil.deleteFile(f); in testParse() 82 File f = FileUtil.createTempFile("hprof", ".test"); in testParse_invalidContent() local 84 FileUtil.writeToFile("SITES BEGIN\nugh, we are in big trouble", f); in testParse_invalidContent() 85 Map<String, String> results = mParser.parse(f); in testParse_invalidContent() 88 FileUtil.deleteFile(f); in testParse_invalidContent()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | NativeDeviceTest.java | 1267 FileInputStreamSource f = null; in testGetBugreportz() local 1269 f = (FileInputStreamSource) mTestDevice.getBugreportz(); in testGetBugreportz() 1270 assertNotNull(f); in testGetBugreportz() 1271 assertTrue(f.createInputStream().available() == 0); in testGetBugreportz() 1273 StreamUtil.cancel(f); in testGetBugreportz() 1274 if (f != null) { in testGetBugreportz() 1275 f.cleanFile(); in testGetBugreportz() 1300 FileInputStreamSource f = null; in testGetBugreportz_fails() local 1302 f = (FileInputStreamSource) mTestDevice.getBugreportz(); in testGetBugreportz_fails() 1303 assertNull(f); in testGetBugreportz_fails() [all …]
|
D | DeviceStateMonitorTest.java | 263 SettableFuture<String> f = SettableFuture.create(); in testWaitForBootComplete() 264 f.set("1"); in testWaitForBootComplete() 265 return f; in testWaitForBootComplete() 281 SettableFuture<String> f = SettableFuture.create(); in testWaitForBoot_becomeComplete() 282 f.set(mStubValue); in testWaitForBoot_becomeComplete() 283 return f; in testWaitForBoot_becomeComplete() 314 SettableFuture<String> f = SettableFuture.create(); in testWaitForBoot_timeout() 315 f.set(mStubValue); in testWaitForBoot_timeout() 316 return f; in testWaitForBoot_timeout()
|
/tools/external_updater/ |
D | notifier.py | 71 with open(owner_file, 'r') as f: 72 return f.read().strip() 143 with open(RESULT_FILE_PATH, 'r') as f: 144 results = json.load(f) 147 with open(args.history, 'r') as f: 148 history = json.load(f) 154 with open(args.history, 'w') as f: 155 json.dump(history, f, sort_keys=True, indent=4)
|
/tools/tradefederation/core/src/com/android/tradefed/build/ |
D | FileDownloadCache.java | 192 File f = new File(mCacheRoot, convertPath(remoteFilePath)); in lockFile() local 194 if (!f.isDirectory()) { in lockFile() 196 f.getParentFile().mkdirs(); in lockFile() 197 f.createNewFile(); in lockFile() 198 fLock = FileChannel.open(f.toPath(), StandardOpenOption.WRITE).lock(); in lockFile() 227 File f = new File(mCacheRoot, convertPath(remoteFilePath)); in tryLockFile() local 229 if (f.exists() && !f.isDirectory()) { in tryLockFile() 231 fLock = FileChannel.open(f.toPath(), StandardOpenOption.WRITE).tryLock(); in tryLockFile()
|
D | DependenciesResolver.java | 77 File f = in getBuild() local 80 if (f != null) { in getBuild() 82 getInvocationFiles().put(f.getName(), f); in getBuild() local 83 build.setFile(f.getName(), f, "1"); in getBuild() local
|
/tools/asuite/aidegen/lib/ |
D | module_info_util.py | 138 original_file_mtimes = {f: None for f in file_paths} 140 original_file_mtimes = {f: os.path.getmtime(f) for f in file_paths} 154 f, original_file_mtimes[f]) for f in file_paths]):
|
/tools/tradefederation/core/ |
D | Android.mk | 76 $(tradefed_dist_zip) : $(SOONG_ZIP) $(foreach f,$(tradefed_dist_copy_pairs),$(call word-colon,1,$(f… 78 $(foreach f,$(PRIVATE_COPY_PAIRS), \ 79 cp -f $(call word-colon,1,$(f)) $(dir $@)/tmp/$(call word-colon,2,$(f)) &&) true 82 $(foreach f,$(PRIVATE_COPY_PAIRS),-f $(dir $@)/tmp/$(call word-colon,2,$(f)))
|
/tools/test/connectivity/acts/framework/acts/controllers/ |
D | iperf_server.py | 107 with open(result_path, 'r') as f: 108 iperf_output = f.readlines() 116 with open(result_path, 'r') as f: 119 lines = f.readlines()[1:] 588 with open(log_file, 'w') as f: 589 f.write(iperf_result.stdout) 743 with open(log_file, 'w') as f: 744 f.write(iperf_result)
|
/tools/test/connectivity/acts/framework/acts/ |
D | test_runner.py | 319 with open(path, 'w') as f: 320 f.write(self.results.json_str()) 328 with open(config_path, 'a') as f: 333 f, 340 with open(path, 'w') as f: 342 f.write('%s:\n%s' % (test_class, ',\n'.join(test_cases))) 343 f.write('\n\n')
|
/tools/asuite/atest/ |
D | asuite_metrics.py | 73 with open(_META_FILE) as f: 75 return uuid.UUID(f.read(), version=4) 88 with open(_META_FILE, 'w+') as f: 89 f.write(str(key)) 99 with open(old_file) as f: 101 key = uuid.UUID(f.read(), version=4)
|
/tools/tradefederation/core/atest/ |
D | asuite_metrics.py | 79 with open(_META_FILE) as f: 81 return uuid.UUID(f.read(), version=4) 94 with open(_META_FILE, 'w+') as f: 95 f.write(str(key)) 105 with open(old_file) as f: 107 key = uuid.UUID(f.read(), version=4)
|
/tools/test/graphicsbenchmark/ |
D | Android.mk | 43 gamecore_dist_copy_pairs += $(foreach f, $(tradefed_files),$(f):gamecore/bin/$(notdir $(f))) 44 gamecore_dist_copy_pairs += $(foreach f, $(config_files),$(f):gamecore/$(notdir $(f)))
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | InstallApexModuleTargetPreparerTest.java | 732 for (File f : fakeSplitApkApks.listFiles()) { in testSetupAndTearDown_ApkAndApks() 734 cmd += ":" + f.getParentFile().getAbsolutePath() + "/" + f.getName(); in testSetupAndTearDown_ApkAndApks() 736 cmd += f.getParentFile().getAbsolutePath() + "/" + f.getName(); in testSetupAndTearDown_ApkAndApks() 940 for (File f : fakeSplitApkApks.listFiles()) { in testInstallUsingBundletool() 942 cmd += ":" + f.getParentFile().getAbsolutePath() + "/" + f.getName(); in testInstallUsingBundletool() 944 cmd += f.getParentFile().getAbsolutePath() + "/" + f.getName(); in testInstallUsingBundletool() 1113 private void mockSuccessfulInstallPackageAndReboot(File f) throws Exception { in mockSuccessfulInstallPackageAndReboot() argument
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | InstallAllTestZipAppsSetup.java | 149 for (File f : files) { in installApksRecursively() 150 if (f.isDirectory()) { in installApksRecursively() 151 installApksRecursively(f, device); in installApksRecursively() 152 } else if (FileUtil.getExtension(f.getAbsolutePath()).toLowerCase().equals(".apk")) { in installApksRecursively() 153 installApk(f, device); in installApksRecursively() 155 CLog.d("Skipping %s because it is not an apk", f.getAbsolutePath()); in installApksRecursively()
|
D | AllTestAppsInstallSetup.java | 119 for (File f : files) { in installApksRecursively() 120 if (f.isDirectory()) { in installApksRecursively() 121 installApksRecursively(f, device); in installApksRecursively() 123 if (FileUtil.getExtension(f.getAbsolutePath()).toLowerCase().equals(".apk")) { in installApksRecursively() 124 installApk(f, device); in installApksRecursively() 126 CLog.d("Skipping %s because it is not an apk", f.getAbsolutePath()); in installApksRecursively()
|