OLD | NEW |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 has_failing_results = True | 82 has_failing_results = True |
83 break | 83 break |
84 if has_failing_results: | 84 if has_failing_results: |
85 self.print_('## Adding test expectations lines to LayoutTests/Te
stExpectations') | 85 self.print_('## Adding test expectations lines to LayoutTests/Te
stExpectations') |
86 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'up
date-w3c-test-expectations') | 86 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'up
date-w3c-test-expectations') |
87 self.run([self.host.executable, script_path]) | 87 self.run([self.host.executable, script_path]) |
88 self.check_run(['git', 'commit', '-a', '-m', '\'Modified Test Ex
pectations from W3C Test Auto-roller\'']) | 88 self.check_run(['git', 'commit', '-a', '-m', '\'Modified Test Ex
pectations from W3C Test Auto-roller\'']) |
89 self.check_run(['git', 'cl', 'upload', '-m', '\'Wrote lines to T
estExpectations\'']) | 89 self.check_run(['git', 'cl', 'upload', '-m', '\'Wrote lines to T
estExpectations\'']) |
90 else: | 90 else: |
91 self.print_('No Failures, committing patch.') | 91 self.print_('No Failures, committing patch.') |
92 quit() | |
93 self.run(['git', 'cl', 'land', '-f']) | 92 self.run(['git', 'cl', 'land', '-f']) |
94 return 0 | 93 return 0 |
95 | 94 |
96 def parse_args(self, argv): | 95 def parse_args(self, argv): |
97 parser = argparse.ArgumentParser() | 96 parser = argparse.ArgumentParser() |
98 parser.description = __doc__ | 97 parser.description = __doc__ |
99 parser.add_argument('-v', '--verbose', action='store_true', | 98 parser.add_argument('-v', '--verbose', action='store_true', |
100 help='log what we are doing') | 99 help='log what we are doing') |
101 parser.add_argument('--allow-local-commits', action='store_true', | 100 parser.add_argument('--allow-local-commits', action='store_true', |
102 help='allow script to run even if we have local comm
its') | 101 help='allow script to run even if we have local comm
its') |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 break | 294 break |
296 else: | 295 else: |
297 sets[result_type].add(line.split()[0]) | 296 sets[result_type].add(line.split()[0]) |
298 return sets | 297 return sets |
299 | 298 |
300 def check_run(self, command): | 299 def check_run(self, command): |
301 return_code, out = self.run(command) | 300 return_code, out = self.run(command) |
302 if return_code: | 301 if return_code: |
303 raise Exception('%s failed with exit code %d.' % ' '.join(command),
return_code) | 302 raise Exception('%s failed with exit code %d.' % ' '.join(command),
return_code) |
304 return out | 303 return out |
OLD | NEW |