/external/chromium-trace/catapult/telemetry/ |
D | json_format | 11 def GetFormattedJSONString(file_path): argument 12 with open(file_path, 'r') as f: 19 def ValidateJSONFormat(file_path): argument 20 with open(file_path, 'r') as f: 22 if file_content != GetFormattedJSONString(file_path): 25 (__file__, file_path)) 26 print >> sys.stdout, ('%s passes the JSON format validation' % file_path) 29 def Format(file_path): argument 30 formatted_JSON_string = GetFormattedJSONString(file_path) 31 with open(file_path, 'w') as f: [all …]
|
D | cloud_storage | 27 file_path = root 30 file_path = path 32 return file_path, hash_path 48 file_path, hash_path = _GetPaths(path) 50 if file_path in file_buckets: 58 file_buckets[file_path] = [] 61 file_buckets[file_path].append(bucket) 103 for file_path, buckets in sorted(files.iteritems()): 106 print '%-11s %s' % (','.join(buckets), file_path) 108 print '%-11s %s' % ('not found', file_path) [all …]
|
/external/chromium-trace/catapult/telemetry/third_party/pyfakefs/pyfakefs/ |
D | fake_filesystem_test.py | 115 file_path = 'some_file1' 116 filesystem.CreateFile(file_path, contents='contents here1', inode=42) 117 self.assertEqual(42, fake_os.stat(file_path)[stat.ST_INO]) 119 file_obj = filesystem.GetObject(file_path) 121 self.assertEqual(43, fake_os.stat(file_path)[stat.ST_INO]) 590 file_path = 'foo/bar/baz' 591 self.filesystem.CreateFile(file_path) 592 self.assertRaises(OSError, self.os.listdir, file_path) 660 file_path = 'file1' 662 fileno = self.os.open(file_path, self.os.O_CREAT) [all …]
|
D | fake_filesystem.py | 138 def __init__(self, file_path): argument 141 'fake large file: %s' % file_path) 569 def Exists(self, file_path): argument 581 if file_path is None: 583 if not file_path: 586 file_path = self.ResolvePath(file_path) 589 if file_path == self.root.name: 591 path_components = self.GetPathComponents(file_path) 599 def ResolvePath(self, file_path): argument 638 def _ValidRelativePath(file_path): argument [all …]
|
/external/chromium-trace/catapult/third_party/vinn/vinn/ |
D | vinn_unittest.py | 81 file_path = self.GetTestFilePath('simple.js') 86 vinn.ExecuteFile(file_path, stdout=f) 93 file_path = self.GetTestFilePath('simple.js') 98 vinn.RunFile(file_path, stdout=f) 105 file_path = self.GetTestFilePath('print_file_content.js') 107 output = vinn.ExecuteFile(file_path, source_paths=[self.test_data_dir], 120 file_path = self.GetTestFilePath('load_simple_html.js') 121 output = vinn.ExecuteFile(file_path, source_paths=[self.test_data_dir]) 130 file_path = self.GetTestFilePath('load_simple_js.js') 131 output = vinn.ExecuteFile(file_path, source_paths=[self.test_data_dir]) [all …]
|
D | html_imports_loader.js | 39 function _stripStartingSlashIfNeeded(file_path) { argument 40 if (file_path.substring(0, 1) !== '/') { 41 return file_path; 43 if (pathUtils.exists(file_path)) 44 return file_path; 45 return file_path.substring(1);
|
/external/skia/tools/ |
D | sanitize_source_files.py | 85 def TrailingWhitespaceRemover(line, file_path, line_number): argument 89 print 'Removing trailing whitespace in %s:%s' % (file_path, line_number) 93 def CrlfReplacer(line, file_path, line_number): argument 96 print 'Replacing CRLF with LF in %s:%s' % (file_path, line_number) 100 def TabReplacer(line, file_path, line_number): argument 103 print 'Replacing Tab with whitespace in %s:%s' % (file_path, line_number) 117 def EOFOneAndOnlyOneNewlineAdder(file_content, file_path): argument 122 print 'Added exactly one newline to %s' % file_path 126 def SvnEOLChecker(file_content, file_path): argument 129 'svn propget svn:eol-style %s' % file_path) [all …]
|
/external/chromium-trace/catapult/dependency_manager/dependency_manager/ |
D | base_config_unittest.py | 59 self.file_path = os.path.abspath(os.path.join( 158 config = dependency_manager.BaseConfig(self.file_path, writable=True) 161 for line in file_module(self.file_path): 163 self.fs.CloseOpenFile(file_module(self.file_path)) 165 self.assertEqual(self.file_path, config._config_path) 169 dependency_manager.BaseConfig, self.file_path) 200 self.assertFalse(os.path.exists(self.file_path)) 201 dependency_manager.BaseConfig._WriteConfigToFile(self.file_path) 202 self.assertTrue(os.path.exists(self.file_path)) 204 for line in file_module(self.file_path): [all …]
|
D | base_config.py | 74 def __init__(self, file_path, writable=False): argument 94 self._config_path = file_path 101 raise exceptions.EmptyConfigError(file_path) 105 with open(file_path, 'r') as f: 108 raise exceptions.EmptyConfigError(file_path) 113 '%s' % (config_type, self.GetConfigType(), file_path)) 353 def _FormatPath(cls, file_path): argument 359 if not file_path: 360 return file_path 362 return file_path.replace('\\', os.path.sep) [all …]
|
/external/libchrome/base/files/ |
D | file_unittest.cc | 23 FilePath file_path = temp_dir.path().AppendASCII("create_file_1"); in TEST() local 38 File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST() 45 File file(file_path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_READ); in TEST() 53 File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST() 66 file.Initialize(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST() 78 File file(file_path, base::File::FLAG_CREATE | base::File::FLAG_READ); in TEST() 86 File file(file_path, in TEST() 95 file_path = temp_dir.path().AppendASCII("create_file_2"); in TEST() 96 File file(file_path, in TEST() 104 EXPECT_FALSE(base::PathExists(file_path)); in TEST() [all …]
|
/external/autotest/client/bin/ |
D | site_sysinfo_unittest.py | 46 def append_text_to_file(self, text, file_path): argument 53 dir_name = os.path.dirname(file_path) 56 with open(file_path, 'a') as f: 69 for file_name, file_path in zip(self.new_files, 71 self.append_text_to_file(file_name, file_path) 80 for file_name, file_path in zip(self.existing_files, 82 self.append_text_to_file(file_name, file_path) 91 for file_name, file_path in zip(self.existing_files+self.new_files, 93 file_path = file_path.replace('src', 'dest') 94 with open(file_path, 'r') as f:
|
D | site_sysinfo.py | 76 def __init__(self, file_path): argument 82 stat = os.stat(file_path) 129 for file_path in self._get_all_files(src_dir): 130 self._log_stats[file_path] = file_stat(file_path) 151 def _copy_new_data_in_file(self, file_path, src_dir, dest_dir): argument 160 if self._log_stats.has_key(file_path): 161 prev_stat = self._log_stats[file_path] 162 new_stat = os.stat(file_path) 171 with open(file_path, 'r') as in_log: 176 os.path.relpath(file_path, src_dir)) [all …]
|
/external/chromium-trace/catapult/third_party/pyfakefs/pyfakefs/ |
D | fake_filesystem.py | 140 def __init__(self, file_path): argument 143 'fake large file: %s' % file_path) 587 def Exists(self, file_path): argument 599 if file_path is None: 601 if not file_path: 604 file_path = self.ResolvePath(file_path) 607 if file_path == self.root.name: 609 path_components = self.GetPathComponents(file_path) 617 def ResolvePath(self, file_path): argument 656 def _ValidRelativePath(file_path): argument [all …]
|
/external/chromium-trace/catapult/catapult_base/catapult_base/ |
D | cloud_storage_unittest.py | 151 file_path = 'test-file-path.wpr' 152 hash_path = file_path + '.sha1' 156 self.assertFalse(cloud_storage.GetIfChanged(file_path, 160 self.assertTrue(cloud_storage.GetIfChanged(file_path, 163 self.CreateFiles([file_path]) 164 self.assertFalse(cloud_storage.GetIfChanged(file_path, 168 self.assertTrue(cloud_storage.GetIfChanged(file_path, 222 file_path = os.path.join(dir_path, 'file1') 223 file_path_sha = file_path + '.sha1' 224 self.CreateFiles([file_path, file_path_sha]) [all …]
|
/external/v8/build/ |
D | gyp_environment.py | 19 def apply_gyp_environment(file_path=None): argument 23 if not file_path or not os.path.exists(file_path): 25 file_contents = open(file_path).read() 29 e.filename = os.path.abspath(file_path) 41 var, os.path.abspath(file_path)
|
/external/chromium-trace/catapult/telemetry/telemetry/core/ |
D | memory_cache_http_server.py | 172 file_path = os.path.join(root, f) 173 if not os.path.exists(file_path): # Allow for '.#' files 175 self.AddFileToResourceMap(file_path) 177 def AddFileToResourceMap(self, file_path): argument 179 file_path = os.path.realpath(file_path) 180 if file_path in self.resource_map: 183 with open(file_path, 'rb') as fd: 186 content_type = mimetypes.guess_type(file_path)[0] 196 self.resource_map[file_path] = { 205 if os.path.basename(file_path) == index: [all …]
|
/external/opencv3/modules/videoio/test/ |
D | test_basic_props.cpp | 69 string file_path = src_dir+"video/big_buck_bunny."+ext[i]; in TEST() local 70 VideoCapture cap(file_path); in TEST() 93 string file_path = src_dir+"video/big_buck_bunny."+ext[i]; in TEST() local 94 VideoCapture cap(file_path); in TEST() 120 string file_path = src_dir+"video/big_buck_bunny."+ext[i]; in TEST() local 121 VideoCapture cap(file_path); in TEST() 143 string file_path = src_dir+"video/big_buck_bunny."+ext[i]; in TEST() local 144 VideoCapture cap(file_path); in TEST()
|
/external/autotest/utils/ |
D | run_pylint.py | 248 def should_check_file(file_path): argument 255 file_path = os.path.abspath(file_path) 256 if file_path.endswith('.py'): 257 return all(not fnmatch.fnmatch(file_path, '*' + pattern) 262 def check_file(file_path, base_opts): argument 269 if not isinstance(file_path, basestring): 271 type(file_path)) 273 if should_check_file(file_path): 274 pylint_runner = pylint.lint.Run(base_opts + [file_path], exit=False) 388 temp_files = [os.path.join(tempdir.name, file_path.split('/')[-1:][0]) [all …]
|
/external/libchrome/base/mac/ |
D | bundle_locations.mm | 58 static void AssignOverridePath(const FilePath& file_path, 60 NSString* path = base::SysUTF8ToNSString(file_path.value()); 62 DCHECK(new_bundle) << "Failed to load the bundle at " << file_path.value(); 74 void SetOverrideOuterBundlePath(const FilePath& file_path) { 75 AssignOverridePath(file_path, &g_override_outer_bundle); 78 void SetOverrideFrameworkBundlePath(const FilePath& file_path) { 79 AssignOverridePath(file_path, &g_override_framework_bundle);
|
/external/owasp/sanitizer/tools/ |
D | googlecode_upload.py | 110 def encode_upload_request(fields, file_path): argument 134 file_name = os.path.basename(file_path) 135 f = open(file_path, 'rb') 155 def upload_find_auth(file_path, project_name, summary, labels=None, argument 194 status, reason, url = upload(file_path, project_name, user_name, password, 235 file_path = args[0] 242 status, reason, url = upload_find_auth(file_path, options.project,
|
/external/autotest/client/cros/multimedia/ |
D | audio_facade_native.py | 132 def playback(self, file_path, data_format, blocking=False): argument 151 file_path, data_format) 159 cras_utils.playback(playback_file=file_path) 209 return self._recorder.file_path 257 def dump_diagnostics(self, file_path): argument 265 with open(file_path, 'w') as f: 321 _, self.file_path = tempfile.mkstemp(prefix='capture_', suffix='.raw') 343 capture_file=self.file_path, duration=None,
|
/external/autotest/client/cros/chameleon/ |
D | screen_comparison.py | 111 file_path = os.path.join( 114 logging.info('Output the image %d to %s', i, file_path) 115 images[i].save(file_path) 117 file_path = os.path.join( 119 logging.info('Output the diff image to %s', file_path) 125 bw_image.save(file_path)
|
/external/chromium-trace/catapult/third_party/gsutil/third_party/boto/boto/ec2/ |
D | keypair.py | 81 file_path = os.path.join(directory_path, '%s.pem' % self.name) 82 if os.path.exists(file_path): 83 raise BotoClientError('%s already exists, it will not be overwritten' % file_path) 84 fp = open(file_path, 'wb') 87 os.chmod(file_path, 0o600)
|
/external/autotest/client/virt/ |
D | virt_test_setup.py | 138 for file_path in self.file_list_str: 140 if re.findall("enabled", file_path): 142 value_list = self.value_listed(open(file_path,"r").read()) 152 check_status_with_value(action_list, file_path) 154 value_list = self.value_listed(open(file_path,"r").read()) 158 check_status_with_value(action_list, file_path) 160 for file_path in self.file_list_num: 162 value = int(open(file_path, "r").read()) 171 check_status_with_value(action_list, file_path)
|
/external/chromium-trace/catapult/telemetry/telemetry/wpr/ |
D | archive_info.py | 29 def __init__(self, file_path, data, bucket): argument 31 self._file_path = file_path 32 self._base_dir = os.path.dirname(file_path) 55 def FromFile(cls, file_path, bucket): argument 56 if os.path.exists(file_path): 57 with open(file_path, 'r') as f: 59 return cls(file_path, data, bucket) 60 return cls(file_path, {'archives': {}}, bucket)
|