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

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

Issue 2132273002: Change DepsUpdater.is_manual_test to check wpt_automation directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove print statement 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 self.print_('cat > %s <<EOF' % path_to_commit_msg) 184 self.print_('cat > %s <<EOF' % path_to_commit_msg)
185 self.print_(commit_msg) 185 self.print_(commit_msg)
186 self.print_('EOF') 186 self.print_('EOF')
187 self.fs.write_text_file(path_to_commit_msg, commit_msg) 187 self.fs.write_text_file(path_to_commit_msg, commit_msg)
188 self.run(['git', 'commit', '-a', '-F', path_to_commit_msg]) 188 self.run(['git', 'commit', '-a', '-F', path_to_commit_msg])
189 self.remove(path_to_commit_msg) 189 self.remove(path_to_commit_msg)
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): # Callback for FileSystem. files_under; not all arguments used - pylint: disable=unused-argument 194 def is_manual_test(self, fs, dirname, basename):
195 # We are importing manual pointer event tests and we are automating them . 195 """Returns True if the file should be removed because it's a manual test .
196 return ("pointerevents" not in dirname) and (basename.endswith('-manual. html') or basename.endswith('-manual.htm')) 196
197 Tests with "-manual" in the name are not considered manual tests
198 if there is a corresponding JS automation file.
199 """
200 basename_without_extension, _ = basename.rsplit('.', 1)
201 if not basename_without_extension.endswith('-manual'):
202 return False
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)
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)):
209 return False
210 return True
197 211
198 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument 212 def is_baseline(self, fs, dirname, basename): # Callback for FileSystem.fil es_under; not all arguments used - pylint: disable=unused-argument
199 return basename.endswith('-expected.txt') 213 return basename.endswith('-expected.txt')
200 214
201 def is_not_baseline(self, fs, dirname, basename): 215 def is_not_baseline(self, fs, dirname, basename):
202 return not self.is_baseline(fs, dirname, basename) 216 return not self.is_baseline(fs, dirname, basename)
203 217
204 def run(self, cmd, exit_on_failure=True, cwd=None): 218 def run(self, cmd, exit_on_failure=True, cwd=None):
205 if self.verbose: 219 if self.verbose:
206 self.print_(' '.join(cmd)) 220 self.print_(' '.join(cmd))
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 sets['Failures'] -= sets['Successes'] 287 sets['Failures'] -= sets['Successes']
274 sets['Started'] -= sets['Successes'] 288 sets['Started'] -= sets['Successes']
275 sets['Started'] -= sets['Failures'] 289 sets['Started'] -= sets['Failures']
276 return sets 290 return sets
277 291
278 def check_run(self, command): 292 def check_run(self, command):
279 return_code, out = self.run(command) 293 return_code, out = self.run(command)
280 if return_code: 294 if return_code:
281 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code) 295 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code)
282 return out 296 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