| 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 attempt to | 7 If this script is given the argument --auto-update, it will also attempt to |
| 8 upload a CL, triggery try jobs, and make any changes that are required for | 8 upload a CL, triggery try jobs, and make any changes that are required for |
| 9 new failing tests before committing. | 9 new failing tests before committing. |
| 10 """ | 10 """ |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 Specifically: | 115 Specifically: |
| 116 - testharnessreport.js contains code needed to integrate our testing | 116 - testharnessreport.js contains code needed to integrate our testing |
| 117 with testharness.js; we also want our code to be used for tests | 117 with testharness.js; we also want our code to be used for tests |
| 118 in wpt. | 118 in wpt. |
| 119 - TODO(qyearsley, jsbell): Document why other other files are copied, | 119 - TODO(qyearsley, jsbell): Document why other other files are copied, |
| 120 or stop copying them if it's unnecessary. | 120 or stop copying them if it's unnecessary. |
| 121 | 121 |
| 122 If this method is changed, the lists of files expected to be identical | 122 If this method is changed, the lists of files expected to be identical |
| 123 in LayoutTests/PRESUBMIT.py should also be changed. | 123 in LayoutTests/PRESUBMIT.py should also be changed. |
| 124 """ | 124 """ |
| 125 # TODO(tkent): resources_to_copy_to_wpt is unnecessary after enabling |
| 126 # WPTServe. |
| 125 resources_to_copy_to_wpt = [ | 127 resources_to_copy_to_wpt = [ |
| 126 ('testharnessreport.js', 'resources'), | 128 ('testharnessreport.js', 'resources'), |
| 127 ('WebIDLParser.js', 'resources'), | 129 ('WebIDLParser.js', 'resources'), |
| 128 ('vendor-prefix.js', 'common'), | 130 ('vendor-prefix.js', 'common'), |
| 129 ] | 131 ] |
| 130 resources_to_copy_from_wpt = [ | 132 resources_to_copy_from_wpt = [ |
| 131 ('idlharness.js', 'resources'), | 133 ('idlharness.js', 'resources'), |
| 132 ('testharness.js', 'resources'), | 134 ('testharness.js', 'resources'), |
| 133 ] | 135 ] |
| 134 for filename, wpt_subdir in resources_to_copy_to_wpt: | 136 for filename, wpt_subdir in resources_to_copy_to_wpt: |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" | 433 """Returns a dict mapping source to dest name for layout tests that have
been renamed.""" |
| 432 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) | 434 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-
filter=R', '--name-status']) |
| 433 renamed_tests = {} | 435 renamed_tests = {} |
| 434 for line in out.splitlines(): | 436 for line in out.splitlines(): |
| 435 _, source_path, dest_path = line.split() | 437 _, source_path, dest_path = line.split() |
| 436 source_test = self.finder.layout_test_name(source_path) | 438 source_test = self.finder.layout_test_name(source_path) |
| 437 dest_test = self.finder.layout_test_name(dest_path) | 439 dest_test = self.finder.layout_test_name(dest_path) |
| 438 if source_test and dest_test: | 440 if source_test and dest_test: |
| 439 renamed_tests[source_test] = dest_test | 441 renamed_tests[source_test] = dest_test |
| 440 return renamed_tests | 442 return renamed_tests |
| OLD | NEW |