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

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

Issue 2799683003: Add skip expectations for new manual tests with a missing or timeout result. (Closed)
Patch Set: Created 3 years, 8 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/wpt_expectations_updater_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/wpt_expectations_updater.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
index 4b44072de56fd032bfb0ebbef85ef18a854d5c82..59f14fc8713fc4c34514482aac5759f084912628 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py
@@ -236,7 +236,7 @@ class WPTExpectationsUpdater(object):
value to create one test expectations line per key.
Args:
- merged_results: A merged_results with the format:
+ merged_results: A dictionary with the format:
{
'test_name': {
'platform': {
@@ -253,17 +253,27 @@ class WPTExpectationsUpdater(object):
"""
line_list = []
for test_name, port_results in sorted(merged_results.iteritems()):
- for port_names in sorted(port_results):
- if test_name.startswith('external'):
- line_parts = [port_results[port_names]['bug']]
- specifier_part = self.specifier_part(self.to_list(port_names), test_name)
- if specifier_part:
- line_parts.append(specifier_part)
- line_parts.append(test_name)
- line_parts.append('[ %s ]' % ' '.join(self.get_expectations(port_results[port_names])))
- line_list.append(' '.join(line_parts))
+ if not test_name.startswith('external'):
+ continue
+ for port_names, results in sorted(port_results.iteritems()):
+ line_list.append(self._create_line(test_name, port_names, results))
return line_list
+ def _create_line(self, test_name, port_names, results):
+ """Constructs one test expectations line string."""
+ line_parts = [results['bug']]
+ specifier_part = self.specifier_part(self.to_list(port_names), test_name)
+ if specifier_part:
+ line_parts.append(specifier_part)
+ line_parts.append(test_name)
+
+ # Skip new manual tests; see crbug.com/708241 for context.
+ if '-manual.' in test_name and results['actual'] in ('MISSING', 'TIMEOUT'):
+ line_parts.append('[ Skip ]')
+ else:
+ line_parts.append('[ %s ]' % ' '.join(self.get_expectations(results)))
+ return ' '.join(line_parts)
+
def specifier_part(self, port_names, test_name):
"""Returns the specifier part for a new test expectations line.
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698