Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py

Issue 2329263002: Run format-webkitpy and fix long lines. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Fetches a copy of the latest state of a W3C test repository and commits. 5 """Fetches a copy of the latest state of a W3C test repository and commits.
6 6
7 If this script is given the argument --auto-update, it will also attempt to 7 If this script is given the argument --auto-update, it will also attempt to
8 upload a CL, triggery try jobs, and make any changes that are required for 8 upload a CL, triggery try jobs, and make any changes that are required for
9 new failing tests before committing. 9 new failing tests before committing.
10 """ 10 """
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 """ 219 """
220 basename_without_extension, _ = self.fs.splitext(basename) 220 basename_without_extension, _ = self.fs.splitext(basename)
221 if not basename_without_extension.endswith('-manual'): 221 if not basename_without_extension.endswith('-manual'):
222 return False 222 return False
223 dir_from_wpt = fs.relpath(dirname, self.path_from_webkit_base('LayoutTes ts', 'imported', 'wpt')) 223 dir_from_wpt = fs.relpath(dirname, self.path_from_webkit_base('LayoutTes ts', 'imported', 'wpt'))
224 automation_dir = self.path_from_webkit_base('LayoutTests', 'imported', ' wpt_automation', dir_from_wpt) 224 automation_dir = self.path_from_webkit_base('LayoutTests', 'imported', ' wpt_automation', dir_from_wpt)
225 if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_witho ut_extension)): 225 if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_witho ut_extension)):
226 return False 226 return False
227 return True 227 return True
228 228
229 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument 229 # Callback for FileSystem.files_under; not all arguments used - pylint: disa ble=unused-argument
230 def is_baseline(self, fs, dirname, basename):
230 return basename.endswith('-expected.txt') 231 return basename.endswith('-expected.txt')
231 232
232 def is_not_baseline(self, fs, dirname, basename): 233 def is_not_baseline(self, fs, dirname, basename):
233 return not self.is_baseline(fs, dirname, basename) 234 return not self.is_baseline(fs, dirname, basename)
234 235
235 def run(self, cmd, exit_on_failure=True, cwd=None): 236 def run(self, cmd, exit_on_failure=True, cwd=None):
236 if self.verbose: 237 if self.verbose:
237 self.print_(' '.join(cmd)) 238 self.print_(' '.join(cmd))
238 239
239 cwd = cwd or self.finder.webkit_base() 240 cwd = cwd or self.finder.webkit_base()
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 email_addresses.add(directory_to_owner[test_dir]) 353 email_addresses.add(directory_to_owner[test_dir])
353 return sorted(email_addresses) 354 return sorted(email_addresses)
354 355
355 def write_test_expectations(self): 356 def write_test_expectations(self):
356 self.print_('## Adding test expectations lines to LayoutTests/TestExpect ations.') 357 self.print_('## Adding test expectations lines to LayoutTests/TestExpect ations.')
357 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'update-w3c -test-expectations') 358 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'update-w3c -test-expectations')
358 self.run([self.host.executable, script_path]) 359 self.run([self.host.executable, script_path])
359 message = '\'Modifies TestExpectations and/or downloads new baselines fo r tests\'' 360 message = '\'Modifies TestExpectations and/or downloads new baselines fo r tests\''
360 self.check_run(['git', 'commit', '-a', '-m', message]) 361 self.check_run(['git', 'commit', '-a', '-m', message])
361 self.git_cl.run(['upload', '-m', message, '--rietveld']) 362 self.git_cl.run(['upload', '-m', message, '--rietveld'])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698