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

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

Issue 2176223002: Call update-w3c-test-expectations in deps_updater.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 self.run(['git', 'add', destination]) 56 self.run(['git', 'add', destination])
57 57
58 elif self.target == 'css': 58 elif self.target == 'css':
59 import_commitish = self.update( 59 import_commitish = self.update(
60 CSS_DEST_NAME, 60 CSS_DEST_NAME,
61 'https://chromium.googlesource.com/external/w3c/csswg-test.git') 61 'https://chromium.googlesource.com/external/w3c/csswg-test.git')
62 else: 62 else:
63 raise AssertionError("Unsupported target %s" % self.target) 63 raise AssertionError("Unsupported target %s" % self.target)
64 64
65 self.commit_changes_if_needed(chromium_commitish, import_commitish) 65 self.commit_changes_if_needed(chromium_commitish, import_commitish)
66 66 # TODO(dcampb): Change try bots to run when new try bots are added.
67 if self.auto_update: 67 if self.auto_update:
68 self.check_run(['git', 'cl', 'upload', '-f']) 68 self.print_('## Uploading change list.')
dcampb 2016/07/25 17:09:27 note, this flag uploads a cl even if no new test
69 self.run(['git', 'cl', 'set-commit', '--dry-run']) 69 self.check_run(['git', 'cl', 'upload', '-f', '-m', 'W3C auto test im porter'])
70 self.print_('## Triggering try jobs.')
71 self.run(['git', 'cl', 'try', '-b', 'linux_chromium_rel_ng'])
72 self.run(['git', 'cl', 'try', '-b', 'mac_chromium_rel_ng'])
73 self.run(['git', 'cl', 'try', '-b', 'win_chromium_rel_ng'])
qyearsley 2016/07/25 21:57:34 As mentioned in person, we will want to get the li
dcampb 2016/07/26 21:18:10 done
74 self.print_('## Waiting for Try Job Results')
75 has_failing_results = False
70 while True: 76 while True:
71 time.sleep(POLL_DELAY_SECONDS) 77 time.sleep(POLL_DELAY_SECONDS)
72 _, out = self.run(['git', 'cl', 'try-results']) 78 _, out = self.run(['git', 'cl', 'try-results'])
73 results = self.parse_try_job_results(out) 79 results = self.parse_try_job_results(out)
74 if results['Started'] or results['Scheduled']: 80 if results.get('Started') or results.get('Scheduled'):
75 continue 81 continue
76 if results['Failures']: 82 if results.get('Failures'):
77 return 1 83 has_failing_results = True
78 break 84 break
85 if has_failing_results:
86 self.print_('## Adding test expectations lines to LayoutTests/Te stExpectations')
87 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'up date-w3c-test-expectations')
88 self.run([self.host.executable, script_path])
dcampb 2016/07/25 17:09:27 This will add lines to Test Expectations IF the te
qyearsley 2016/07/25 21:57:34 Seems like it should only ever add tests that were
dcampb 2016/07/26 21:18:09 Fixed only adding new imported test. See issue #:2
89 self.check_run(['git', 'commit', '-a', '-m', '\'Modified Test Ex pectations from W3C_Test_AutoRoller\''])
qyearsley 2016/07/25 21:57:34 W3C_Test_Autoroller -> W3C Test Auto-roller?
dcampb 2016/07/26 21:18:09 done
90 self.check_run(['git', 'cl', 'upload', '-m', '\'Wrote lines to T est Expectations\''])
qyearsley 2016/07/25 21:57:34 Test Expectations -> TestExpectations
dcampb 2016/07/26 21:18:09 done
91 else:
92 self.print_('No Failures, committing patch.')
79 self.run(['git', 'cl', 'land', '-f']) 93 self.run(['git', 'cl', 'land', '-f'])
80 return 0 94 return 0
81 95
82 def parse_args(self, argv): 96 def parse_args(self, argv):
83 parser = argparse.ArgumentParser() 97 parser = argparse.ArgumentParser()
84 parser.description = __doc__ 98 parser.description = __doc__
85 parser.add_argument('-v', '--verbose', action='store_true', 99 parser.add_argument('-v', '--verbose', action='store_true',
86 help='log what we are doing') 100 help='log what we are doing')
87 parser.add_argument('--allow-local-commits', action='store_true', 101 parser.add_argument('--allow-local-commits', action='store_true',
88 help='allow script to run even if we have local comm its') 102 help='allow script to run even if we have local comm its')
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 sets = {} 288 sets = {}
275 for line in results.splitlines(): 289 for line in results.splitlines():
276 line = line.strip() 290 line = line.strip()
277 if line[-1] == ':': 291 if line[-1] == ':':
278 result_type = line[:-1] 292 result_type = line[:-1]
279 sets[result_type] = set() 293 sets[result_type] = set()
280 elif line.split()[0] == 'Total:': 294 elif line.split()[0] == 'Total:':
281 break 295 break
282 else: 296 else:
283 sets[result_type].add(line.split()[0]) 297 sets[result_type].add(line.split()[0])
284 sets['Failures'] -= sets['Successes']
285 sets['Started'] -= sets['Successes']
286 sets['Started'] -= sets['Failures']
287 return sets 298 return sets
288 299
289 def check_run(self, command): 300 def check_run(self, command):
290 return_code, out = self.run(command) 301 return_code, out = self.run(command)
291 if return_code: 302 if return_code:
292 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code) 303 raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code)
293 return out 304 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