Chromium Code Reviews| 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 json | 8 import json |
| 9 import time | 9 import time |
| 10 | 10 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 335 directory_dict = {} | 335 directory_dict = {} |
| 336 for dict_set in decoded_data_file: | 336 for dict_set in decoded_data_file: |
| 337 if dict_set['notification-email']: | 337 if dict_set['notification-email']: |
| 338 directory_dict[dict_set['directory']] = dict_set['notification-e mail'] | 338 directory_dict[dict_set['directory']] = dict_set['notification-e mail'] |
| 339 return directory_dict | 339 return directory_dict |
| 340 | 340 |
| 341 def write_test_expectations(self): | 341 def write_test_expectations(self): |
| 342 self.print_('## Adding test expectations lines to LayoutTests/TestExpect ations.') | 342 self.print_('## Adding test expectations lines to LayoutTests/TestExpect ations.') |
| 343 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'update-w3c -test-expectations') | 343 script_path = self.path_from_webkit_base('Tools', 'Scripts', 'update-w3c -test-expectations') |
| 344 self.run([self.host.executable, script_path]) | 344 self.run([self.host.executable, script_path]) |
| 345 message = '\'Modifies TestExpectations and/or downloads new baselines fo r tests .\'' | 345 message = """'Modifies TestExpectations and/or downloads new baselines f or tests |
| 346 | |
| 347 TBR=qyearsley@chromium.org, dpranke@chromium.org """ | |
|
Dirk Pranke
2016/08/10 16:52:10
I would prefer not to get these. I think that you
| |
| 346 self.check_run(['git', 'commit', '-a', '-m', message]) | 348 self.check_run(['git', 'commit', '-a', '-m', message]) |
| 347 self.check_run(['git', 'cl', 'upload', '-m', message, | 349 self.check_run(['git', 'cl', 'upload', '-m', message, |
| 348 '--auth-refresh-token-json', self.auth_refresh_token_jso n]) | 350 '--auth-refresh-token-json', self.auth_refresh_token_jso n]) |
| 349 | 351 |
| 350 def has_failing_results(self): | 352 def has_failing_results(self): |
| 351 while True: | 353 while True: |
| 352 time.sleep(POLL_DELAY_SECONDS) | 354 time.sleep(POLL_DELAY_SECONDS) |
| 353 self.print_('Still waiting...') | 355 self.print_('Still waiting...') |
| 354 _, out = self.run(['git', 'cl', 'try-results']) | 356 _, out = self.run(['git', 'cl', 'try-results']) |
| 355 results = self.parse_try_job_results(out) | 357 results = self.parse_try_job_results(out) |
| 356 if results.get('Started') or results.get('Scheduled'): | 358 if results.get('Started') or results.get('Scheduled'): |
| 357 continue | 359 continue |
| 358 if results.get('Failures'): | 360 if results.get('Failures'): |
| 359 return True | 361 return True |
| 360 return False | 362 return False |
| 361 | 363 |
| 362 def generate_upload_command(self, email_list): | 364 def generate_upload_command(self, email_list): |
| 363 command = ['git', 'cl', 'upload', '-f', '-m', 'W3C auto test importer'] | 365 command = ['git', 'cl', 'upload', '-f', '-m', 'W3C auto test importer'] |
| 364 command += ['--cc=' + email for email in email_list] | 366 command += ['--cc=' + email for email in email_list] |
| 365 if self.auth_refresh_token_json: | 367 if self.auth_refresh_token_json: |
| 366 command += ['--auth-refresh-token-json', self.auth_refresh_token_jso n] | 368 command += ['--auth-refresh-token-json', self.auth_refresh_token_jso n] |
| 367 return command | 369 return command |
| OLD | NEW |