Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 2684663003: WPT importer: List directory owners in CL description. (Closed)
Patch Set: Update change to not change TBR line. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
index e50887340a7fc140acfbe0b3f84e3a9f2c4f7c1d..ace8744b56f9f63c360892c5140c16390b9ba9a4 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -361,15 +361,15 @@ class TestImporter(object):
def _upload_cl(self):
_log.info('Uploading change list.')
- cc_list = self.get_directory_owners()
- description = self._cl_description()
+ directory_owners = self.get_directory_owners()
+ description = self._cl_description(directory_owners)
self.git_cl.run([
'upload',
'-f',
'--rietveld',
'-m',
description,
- ] + ['--cc=' + email for email in cc_list])
+ ] + ['--cc=' + email_address for email_address in directory_owners])
def get_directory_owners(self):
"""Returns a list of email addresses of owners of changed tests."""
@@ -379,18 +379,30 @@ class TestImporter(object):
extractor.read_owner_map()
return extractor.list_owners(changed_files)
- def _cl_description(self):
+ def _cl_description(self, directory_owners):
description = self.check_run(['git', 'log', '-1', '--format=%B'])
build_link = current_build_link(self.host)
if build_link:
description += 'Build: %s\n\n' % build_link
+
+ if directory_owners:
+ description += self._format_directory_owners(directory_owners) + '\n\n'
description += 'TBR=qyearsley@chromium.org\n'
+
# Move any NOEXPORT tag to the end of the description.
description = description.replace('NOEXPORT=true', '')
description = description.replace('\n\n\n\n', '\n\n')
description += 'NOEXPORT=true'
return description
+ @staticmethod
+ def _format_directory_owners(directory_owners):
+ message_lines = ['Directory owners for changes in this CL:']
+ for owner, directories in sorted(directory_owners.items()):
+ message_lines.append(owner + ':')
+ message_lines.extend([' ' + d for d in directories])
+ return '\n'.join(message_lines)
+
def fetch_new_expectations_and_baselines(self):
"""Adds new expectations and downloads baselines based on try job results, then commits and uploads the change."""
_log.info('Adding test expectations lines to LayoutTests/TestExpectations.')
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698