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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 _, show_ref_output = self.run(['git', 'show-ref', 'origin/master'], cwd=
temp_repo_path) | 223 _, show_ref_output = self.run(['git', 'show-ref', 'origin/master'], cwd=
temp_repo_path) |
224 master_commitish = show_ref_output.split()[0] | 224 master_commitish = show_ref_output.split()[0] |
225 | 225 |
226 dest_path = self.finder.path_from_layout_tests('external', dest_dir_name
) | 226 dest_path = self.finder.path_from_layout_tests('external', dest_dir_name
) |
227 self._clear_out_dest_path(dest_path) | 227 self._clear_out_dest_path(dest_path) |
228 | 228 |
229 _log.info('Importing the tests.') | 229 _log.info('Importing the tests.') |
230 test_copier = TestCopier(self.host, temp_repo_path) | 230 test_copier = TestCopier(self.host, temp_repo_path) |
231 test_copier.do_import() | 231 test_copier.do_import() |
232 | 232 |
233 self.run(['git', 'add', '--all', 'LayoutTests/external/%s' % dest_dir_na
me]) | 233 self.run(['git', 'add', '--all', 'external/%s' % dest_dir_name]) |
234 | 234 |
235 self._delete_orphaned_baselines(dest_path) | 235 self._delete_orphaned_baselines(dest_path) |
236 | 236 |
237 self._generate_manifest(dest_path) | 237 self._generate_manifest(dest_path) |
238 | 238 |
239 _log.info('Updating TestExpectations for any removed or renamed tests.') | 239 _log.info('Updating TestExpectations for any removed or renamed tests.') |
240 self.update_all_test_expectations_files(self._list_deleted_tests(), self
._list_renamed_tests()) | 240 self.update_all_test_expectations_files(self._list_deleted_tests(), self
._list_renamed_tests()) |
241 | 241 |
242 return '%s@%s' % (dest_dir_name, master_commitish) | 242 return '%s@%s' % (dest_dir_name, master_commitish) |
243 | 243 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" | 474 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" |
475 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) | 475 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) |
476 renamed_tests = {} | 476 renamed_tests = {} |
477 for line in out.splitlines(): | 477 for line in out.splitlines(): |
478 _, source_path, dest_path = line.split() | 478 _, source_path, dest_path = line.split() |
479 source_test = self.finder.layout_test_name(source_path) | 479 source_test = self.finder.layout_test_name(source_path) |
480 dest_test = self.finder.layout_test_name(dest_path) | 480 dest_test = self.finder.layout_test_name(dest_path) |
481 if source_test and dest_test: | 481 if source_test and dest_test: |
482 renamed_tests[source_test] = dest_test | 482 renamed_tests[source_test] = dest_test |
483 return renamed_tests | 483 return renamed_tests |
OLD | NEW |