| 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 fo
r tests\'' |
| 346 self.check_run(['git', 'commit', '-a', '-m', message]) | 346 self.check_run(['git', 'commit', '-a', '-m', message]) |
| 347 self.check_run(['git', 'cl', 'upload', '-m', message, | 347 self.check_run(['git', 'cl', 'upload', '-m', message, |
| 348 '--auth-refresh-token-json', self.auth_refresh_token_jso
n]) | 348 '--auth-refresh-token-json', self.auth_refresh_token_jso
n]) |
| 349 | 349 |
| 350 def has_failing_results(self): | 350 def has_failing_results(self): |
| 351 while True: | 351 while True: |
| 352 time.sleep(POLL_DELAY_SECONDS) | 352 time.sleep(POLL_DELAY_SECONDS) |
| 353 self.print_('Still waiting...') | 353 self.print_('Still waiting...') |
| 354 _, out = self.run(['git', 'cl', 'try-results']) | 354 _, out = self.run(['git', 'cl', 'try-results']) |
| 355 results = self.parse_try_job_results(out) | 355 results = self.parse_try_job_results(out) |
| 356 if results.get('Started') or results.get('Scheduled'): | 356 if results.get('Started') or results.get('Scheduled'): |
| 357 continue | 357 continue |
| 358 if results.get('Failures'): | 358 if results.get('Failures'): |
| 359 return True | 359 return True |
| 360 return False | 360 return False |
| 361 | 361 |
| 362 def generate_upload_command(self, email_list): | 362 def generate_upload_command(self, email_list): |
| 363 command = ['git', 'cl', 'upload', '-f', '-m', 'W3C auto test importer'] | 363 message = """W3C auto test importer |
| 364 |
| 365 TBR=qyearsley@chromium.org""" |
| 366 |
| 367 command = ['git', 'cl', 'upload', '-f', '-m', message] |
| 364 command += ['--cc=' + email for email in email_list] | 368 command += ['--cc=' + email for email in email_list] |
| 365 if self.auth_refresh_token_json: | 369 if self.auth_refresh_token_json: |
| 366 command += ['--auth-refresh-token-json', self.auth_refresh_token_jso
n] | 370 command += ['--auth-refresh-token-json', self.auth_refresh_token_jso
n] |
| 367 return command | 371 return command |
| OLD | NEW |