| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 Args: | 402 Args: |
| 403 directory_owners: A dict of tuples of owner names to lists of direct
ories. | 403 directory_owners: A dict of tuples of owner names to lists of direct
ories. |
| 404 """ | 404 """ |
| 405 description = self.check_run(['git', 'log', '-1', '--format=%B']) | 405 description = self.check_run(['git', 'log', '-1', '--format=%B']) |
| 406 build_link = current_build_link(self.host) | 406 build_link = current_build_link(self.host) |
| 407 if build_link: | 407 if build_link: |
| 408 description += 'Build: %s\n\n' % build_link | 408 description += 'Build: %s\n\n' % build_link |
| 409 | 409 |
| 410 if directory_owners: | 410 if directory_owners: |
| 411 description += self._format_directory_owners(directory_owners) + '\n
\n' | 411 description += self._format_directory_owners(directory_owners) + '\n
\n' |
| 412 description += 'TBR=jeffcarp@chromium.org\n' | 412 description += 'TBR=qyearsley@chromium.org\n' |
| 413 | 413 |
| 414 # Move any NOEXPORT tag to the end of the description. | 414 # Move any NOEXPORT tag to the end of the description. |
| 415 description = description.replace('NOEXPORT=true', '') | 415 description = description.replace('NOEXPORT=true', '') |
| 416 description = description.replace('\n\n\n\n', '\n\n') | 416 description = description.replace('\n\n\n\n', '\n\n') |
| 417 description += 'NOEXPORT=true' | 417 description += 'NOEXPORT=true' |
| 418 return description | 418 return description |
| 419 | 419 |
| 420 @staticmethod | 420 @staticmethod |
| 421 def _format_directory_owners(directory_owners): | 421 def _format_directory_owners(directory_owners): |
| 422 message_lines = ['Directory owners for changes in this CL:'] | 422 message_lines = ['Directory owners for changes in this CL:'] |
| (...skipping 51 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 |