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

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

Issue 2144343002: Fix is_manual_test for files with no file extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 self.print_('## Done: changes imported and committed.') 190 self.print_('## Done: changes imported and committed.')
191 else: 191 else:
192 self.print_('## Done: no changes to import.') 192 self.print_('## Done: no changes to import.')
193 193
194 def is_manual_test(self, fs, dirname, basename): 194 def is_manual_test(self, fs, dirname, basename):
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 if '.' not in basename:
201 return False
200 basename_without_extension, _ = basename.rsplit('.', 1) 202 basename_without_extension, _ = basename.rsplit('.', 1)
Rick Byers 2016/07/15 15:29:49 nit: this would be slightly simpler as: basename_w
201 if not basename_without_extension.endswith('-manual'): 203 if not basename_without_extension.endswith('-manual'):
202 return False 204 return False
203 dir_from_wpt = fs.relpath(dirname, self.path_from_webkit_base('LayoutTes ts', 'imported', 'wpt')) 205 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) 206 automation_dir = self.path_from_webkit_base('LayoutTests', 'imported', ' wpt_automation', dir_from_wpt)
205 if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_witho ut_extension)): 207 if fs.isfile(fs.join(automation_dir, '%s-automation.js' % basename_witho ut_extension)):
206 return False 208 return False
207 return True 209 return True
208 210
209 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument 211 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument
210 return basename.endswith('-expected.txt') 212 return basename.endswith('-expected.txt')
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 sets['Failures'] -= sets['Successes'] 286 sets['Failures'] -= sets['Successes']
285 sets['Started'] -= sets['Successes'] 287 sets['Started'] -= sets['Successes']
286 sets['Started'] -= sets['Failures'] 288 sets['Started'] -= sets['Failures']
287 return sets 289 return sets
288 290
289 def check_run(self, command): 291 def check_run(self, command):
290 return_code, out = self.run(command) 292 return_code, out = self.run(command)
291 if return_code: 293 if return_code:
292 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code) 294 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code)
293 return out 295 return out
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698