| 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.
|
|
|
|
|