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

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

Issue 2877123002: When importing wpt tests, add skip expectations for tests with missing results. (Closed)
Patch Set: Created 3 years, 7 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 ea47086c00b2142fe8772a562198fb24ef69c24a..d5d9bbca2a9c6eb084317bb4bf08951ade054475 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
@@ -201,7 +201,8 @@ class WPTExpectationsUpdater(object):
matching_value_keys = set()
return merged_dict
- def get_expectations(self, results):
+ def get_expectations(self, results, test_name=''):
+
"""Returns a set of test expectations to use based on results.
Returns a set of one or more test expectations based on the expected
@@ -217,11 +218,21 @@ class WPTExpectationsUpdater(object):
'bug': 'crbug.com/11111'
}
}
+ test_name: The test name string (optional).
Returns:
A set of one or more test expectation strings with the first letter
capitalized. Example: set(['Failure', 'Timeout']).
"""
+ # If the result is MISSING, this implies that the test was not
+ # rebaselined and has an actual result but no baseline. We can't
+ # add a Missing expectation (this is not allowed), but no other
+ # expectation is correct.
+ # We also want to skip any new manual tests that are not automated;
+ # see crbug.com/708241 for context.
+ if (results['actual'] == 'MISSING' or
+ '-manual.' in test_name and results['actual'] == 'TIMEOUT'):
+ return {'Skip'}
expectations = set()
failure_types = ('TEXT', 'IMAGE+TEXT', 'IMAGE', 'AUDIO')
other_types = ('TIMEOUT', 'CRASH', 'PASS')
@@ -269,12 +280,8 @@ class WPTExpectationsUpdater(object):
if specifier_part:
line_parts.append(specifier_part)
line_parts.append(test_name)
+ line_parts.append('[ %s ]' % ' '.join(self.get_expectations(results, 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):
« 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