| 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 """Fetches a copy of the latest state of a W3C test repository and commits. | 5 """Fetches a copy of the latest state of a W3C test repository and commits. |
| 6 | 6 |
| 7 If this script is given the argument --auto-update, it will also: | 7 If this script is given the argument --auto-update, it will also: |
| 8 1. Upload a CL. | 8 1. Upload a CL. |
| 9 2. Trigger try jobs and wait for them to complete. | 9 2. Trigger try jobs and wait for them to complete. |
| 10 3. Make any changes that are required for new failing tests. | 10 3. Make any changes that are required for new failing tests. |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 so before being able to commit these new changes, we may need to update | 337 so before being able to commit these new changes, we may need to update |
| 338 TestExpectations or download new baselines. | 338 TestExpectations or download new baselines. |
| 339 | 339 |
| 340 Returns: | 340 Returns: |
| 341 True if successfully committed, False otherwise. | 341 True if successfully committed, False otherwise. |
| 342 """ | 342 """ |
| 343 self._upload_cl() | 343 self._upload_cl() |
| 344 _log.info('Issue: %s', self.git_cl.run(['issue']).strip()) | 344 _log.info('Issue: %s', self.git_cl.run(['issue']).strip()) |
| 345 | 345 |
| 346 # First, try on Blink try bots in order to get any new baselines. | 346 # First, try on Blink try bots in order to get any new baselines. |
| 347 # TODO(qyearsley): Make this faster by triggering all try jobs in |
| 348 # one invocation. |
| 347 _log.info('Triggering try jobs.') | 349 _log.info('Triggering try jobs.') |
| 348 for try_bot in self.host.builders.all_try_builder_names(): | 350 self.git_cl.trigger_try_jobs() |
| 349 self.git_cl.run(['try', '-b', try_bot]) | |
| 350 try_results = self.git_cl.wait_for_try_jobs( | 351 try_results = self.git_cl.wait_for_try_jobs( |
| 351 poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECON
DS) | 352 poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECON
DS) |
| 352 | 353 |
| 353 if not try_results: | 354 if not try_results: |
| 354 self.git_cl.run(['set-close']) | 355 self.git_cl.run(['set-close']) |
| 355 return False | 356 return False |
| 356 | 357 |
| 357 if try_results and self.git_cl.has_failing_try_results(try_results): | 358 if try_results and self.git_cl.has_failing_try_results(try_results): |
| 358 self.fetch_new_expectations_and_baselines() | 359 self.fetch_new_expectations_and_baselines() |
| 359 | 360 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" | 487 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" |
| 487 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) | 488 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) |
| 488 renamed_tests = {} | 489 renamed_tests = {} |
| 489 for line in out.splitlines(): | 490 for line in out.splitlines(): |
| 490 _, source_path, dest_path = line.split() | 491 _, source_path, dest_path = line.split() |
| 491 source_test = self.finder.layout_test_name(source_path) | 492 source_test = self.finder.layout_test_name(source_path) |
| 492 dest_test = self.finder.layout_test_name(dest_path) | 493 dest_test = self.finder.layout_test_name(dest_path) |
| 493 if source_test and dest_test: | 494 if source_test and dest_test: |
| 494 renamed_tests[source_test] = dest_test | 495 renamed_tests[source_test] = dest_test |
| 495 return renamed_tests | 496 return renamed_tests |
| OLD | NEW |