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

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

Issue 2607013002: Simplify platform specifier list added by w3c-test-autoroller. (Closed)
Patch Set: Rebased Created 3 years, 11 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/update_w3c_test_expectations_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/update_w3c_test_expectations.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py
index 027a3b792b60597c2cb36359a767b11e57eb56a8..b524e5f0c56a2078af331f8096f3f67a2e9b686b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py
@@ -252,37 +252,31 @@ class W3CExpectationsLineAdder(object):
Args:
merged_results: A merged_results with the format:
- {
- 'test_name': {
- 'platform': {
- 'expected: 'PASS',
- 'actual': 'FAIL',
- 'bug': 'crbug.com/11111'
- }
- }
- }
+ {test: {platforms: {'expected: '...', 'actual': '...', 'bug': '...'}}}
Returns:
A list of test expectations lines with the format:
- ['BUG_URL [PLATFORM(S)] TEST_MAME [EXPECTATION(S)]']
+ ['BUG_URL [PLATFORM(S)] TEST_NAME [EXPECTATION(S)]']
"""
line_list = []
for test_name, platform_results in merged_results.iteritems():
for platform in platform_results:
- if test_name.startswith('external'):
- platform_list = []
- bug = []
- expectations = []
- if isinstance(platform, tuple):
- platform_list = list(platform)
- else:
- platform_list.append(platform)
- bug.append(platform_results[platform]['bug'])
- expectations = self.get_expectations(platform_results[platform])
- line = '%s [ %s ] %s [ %s ]' % (bug[0], ' '.join(platform_list), test_name, ' '.join(expectations))
- line_list.append(str(line))
+ if not test_name.startswith('external/'):
+ continue
+ bug = []
+ expectations = []
+ platform_specifier = self._platform_specifier(platform)
+ bug.append(platform_results[platform]['bug'])
+ expectations = self.get_expectations(platform_results[platform])
+ line = '%s [ %s ] %s [ %s ]' % (bug[0], platform_specifier, test_name, ' '.join(expectations))
+ line_list.append(str(line))
return line_list
+ def _platform_specifier(self, platform):
+ if isinstance(platform, tuple):
+ return ' '.join(sorted(platform))
+ return platform
+
def write_to_test_expectations(self, line_list):
"""Writes to TestExpectations.
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698