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

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

Issue 2142283002: Rename *-input.js -> *-automation.js in wpt_automation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 4 years, 5 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 """Pull latest revisions of a W3C test repo and make a local commit.""" 5 """Pull latest revisions of a W3C test repo and make a local commit."""
6 6
7 import argparse 7 import argparse
8 import time 8 import time
9 9
10 from webkitpy.common.webkit_finder import WebKitFinder 10 from webkitpy.common.webkit_finder import WebKitFinder
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 """Returns True if the file should be removed because it's a manual test . 195 """Returns True if the file should be removed because it's a manual test .
196 196
197 Tests with "-manual" in the name are not considered manual tests 197 Tests with "-manual" in the name are not considered manual tests
198 if there is a corresponding JS automation file. 198 if there is a corresponding JS automation file.
199 """ 199 """
200 basename_without_extension, _ = basename.rsplit('.', 1) 200 basename_without_extension, _ = basename.rsplit('.', 1)
201 if not basename_without_extension.endswith('-manual'): 201 if not basename_without_extension.endswith('-manual'):
202 return False 202 return False
203 dir_from_wpt = fs.relpath(dirname, self.path_from_webkit_base('LayoutTes ts', 'imported', 'wpt')) 203 dir_from_wpt = fs.relpath(dirname, self.path_from_webkit_base('LayoutTes ts', 'imported', 'wpt'))
204 automation_dir = self.path_from_webkit_base('LayoutTests', 'imported', ' wpt_automation', dir_from_wpt) 204 automation_dir = self.path_from_webkit_base('LayoutTests', 'imported', ' wpt_automation', dir_from_wpt)
205 # TODO(qyearsley): Update this when all *-input.js are renamed to *-auto mation.js.
206 if fs.isfile(fs.join(automation_dir, '%s-input.js' % basename_without_ex tension)):
207 return False
208 if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_witho ut_extension)): 205 if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_witho ut_extension)):
209 return False 206 return False
210 return True 207 return True
211 208
212 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument 209 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument
213 return basename.endswith('-expected.txt') 210 return basename.endswith('-expected.txt')
214 211
215 def is_not_baseline(self, fs, dirname, basename): 212 def is_not_baseline(self, fs, dirname, basename):
216 return not self.is_baseline(fs, dirname, basename) 213 return not self.is_baseline(fs, dirname, basename)
217 214
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 sets['Failures'] -= sets['Successes'] 284 sets['Failures'] -= sets['Successes']
288 sets['Started'] -= sets['Successes'] 285 sets['Started'] -= sets['Successes']
289 sets['Started'] -= sets['Failures'] 286 sets['Started'] -= sets['Failures']
290 return sets 287 return sets
291 288
292 def check_run(self, command): 289 def check_run(self, command):
293 return_code, out = self.run(command) 290 return_code, out = self.run(command)
294 if return_code: 291 if return_code:
295 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code) 292 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code)
296 return out 293 return out
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698