| 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 21 matching lines...) Expand all Loading... |
| 32 POLL_DELAY_SECONDS = 2 * 60 | 32 POLL_DELAY_SECONDS = 2 * 60 |
| 33 TIMEOUT_SECONDS = 180 * 60 | 33 TIMEOUT_SECONDS = 180 * 60 |
| 34 | 34 |
| 35 _log = logging.getLogger(__file__) | 35 _log = logging.getLogger(__file__) |
| 36 | 36 |
| 37 | 37 |
| 38 class TestImporter(object): | 38 class TestImporter(object): |
| 39 | 39 |
| 40 def __init__(self, host): | 40 def __init__(self, host): |
| 41 self.host = host | 41 self.host = host |
| 42 self.host.initialize_scm() |
| 42 self.executive = host.executive | 43 self.executive = host.executive |
| 43 self.fs = host.filesystem | 44 self.fs = host.filesystem |
| 44 self.finder = WebKitFinder(self.fs) | 45 self.finder = WebKitFinder(self.fs) |
| 45 self.verbose = False | 46 self.verbose = False |
| 46 self.git_cl = None | 47 self.git_cl = None |
| 47 | 48 |
| 48 def main(self, argv=None): | 49 def main(self, argv=None): |
| 49 options = self.parse_args(argv) | 50 options = self.parse_args(argv) |
| 50 self.verbose = options.verbose | 51 self.verbose = options.verbose |
| 51 log_level = logging.DEBUG if self.verbose else logging.INFO | 52 log_level = logging.DEBUG if self.verbose else logging.INFO |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" | 442 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" |
| 442 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) | 443 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) |
| 443 renamed_tests = {} | 444 renamed_tests = {} |
| 444 for line in out.splitlines(): | 445 for line in out.splitlines(): |
| 445 _, source_path, dest_path = line.split() | 446 _, source_path, dest_path = line.split() |
| 446 source_test = self.finder.layout_test_name(source_path) | 447 source_test = self.finder.layout_test_name(source_path) |
| 447 dest_test = self.finder.layout_test_name(dest_path) | 448 dest_test = self.finder.layout_test_name(dest_path) |
| 448 if source_test and dest_test: | 449 if source_test and dest_test: |
| 449 renamed_tests[source_test] = dest_test | 450 renamed_tests[source_test] = dest_test |
| 450 return renamed_tests | 451 return renamed_tests |
| OLD | NEW |