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

Side by Side Diff: media/tools/layout_tests/test_expectations.py

Issue 14316009: Update tools to reflect movement of TestExpectations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix equality test Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/tools/layout_tests/README ('k') | media/tools/layout_tests/test_expectations_history.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """A module to analyze test expectations for Webkit layout tests.""" 5 """A module to analyze test expectations for Webkit layout tests."""
6 6
7 import urllib2 7 import urllib2
8 8
9 from webkitpy.layout_tests.models.test_expectations import * 9 from webkitpy.layout_tests.models.test_expectations import *
10 10
11 # Default Webkit SVN location for chromium test expectation file. 11 # Default location for chromium test expectation file.
12 # TODO(imasaki): support multiple test expectations files. 12 # TODO(imasaki): support multiple test expectations files.
13 DEFAULT_TEST_EXPECTATION_LOCATION = ( 13 DEFAULT_TEST_EXPECTATIONS_LOCATION = (
14 'http://svn.webkit.org/repository/webkit/trunk/' 14 'http://src.chromium.org/blink/trunk/LayoutTests/TestExpectations')
15 'LayoutTests/platform/chromium/TestExpectations')
16 15
17 # The following is from test expectation syntax. The detail can be found in 16 # The following is from test expectation syntax. The detail can be found in
18 # http://www.chromium.org/developers/testing/webkit-layout-tests#TOC-Test-Expect ations 17 # http://www.chromium.org/developers/testing/webkit-layout-tests#TOC-Test-Expect ations
19 # <decision> ::== [SKIP] [WONTFIX] [SLOW] 18 # <decision> ::== [SKIP] [WONTFIX] [SLOW]
20 DECISION_NAMES = ['SKIP', 'WONTFIX', 'SLOW'] 19 DECISION_NAMES = ['SKIP', 'WONTFIX', 'SLOW']
21 # <config> ::== RELEASE | DEBUG 20 # <config> ::== RELEASE | DEBUG
22 CONFIG_NAMES = ['RELEASE', 'DEBUG'] 21 CONFIG_NAMES = ['RELEASE', 'DEBUG']
23 # Only hard code keywords we don't expect to change. Determine the rest from 22 # Only hard code keywords we don't expect to change. Determine the rest from
24 # the format of the status line. 23 # the format of the status line.
25 KNOWN_TE_KEYWORDS = DECISION_NAMES + CONFIG_NAMES 24 KNOWN_TE_KEYWORDS = DECISION_NAMES + CONFIG_NAMES
(...skipping 18 matching lines...) Expand all
44 platform/chromium/media/video-frame-size-change.html [ Timeout ] 43 platform/chromium/media/video-frame-size-change.html [ Timeout ]
45 webkit.org/b/84724 [ SnowLeopard ] \ 44 webkit.org/b/84724 [ SnowLeopard ] \
46 platform/chromium/media/video-frame-size-change.html \ 45 platform/chromium/media/video-frame-size-change.html \
47 [ ImageOnlyFailure Pass ] 46 [ ImageOnlyFailure Pass ]
48 47
49 {'platform/chromium/media/video-frame-size-change.html': [{'IMAGE': True, 48 {'platform/chromium/media/video-frame-size-change.html': [{'IMAGE': True,
50 'Bugs': ['BUGWK84724', 'BUGCR145590'], 'Comments': '', 49 'Bugs': ['BUGWK84724', 'BUGCR145590'], 'Comments': '',
51 'Platforms': ['SNOWLEOPARD', 'ANDROID'], 'TIMEOUT': True, 'PASS': True}]} 50 'Platforms': ['SNOWLEOPARD', 'ANDROID'], 'TIMEOUT': True, 'PASS': True}]}
52 """ 51 """
53 52
54 def __init__(self, url=DEFAULT_TEST_EXPECTATION_LOCATION): 53 def __init__(self, url=DEFAULT_TEST_EXPECTATIONS_LOCATION):
55 """Read the test expectation file from the specified URL and parse it. 54 """Read the test expectation file from the specified URL and parse it.
56 55
57 Args: 56 Args:
58 url: A URL string for the test expectation file. 57 url: A URL string for the test expectation file.
59 58
60 Raises: 59 Raises:
61 NameError when the test expectation file cannot be retrieved from |url|. 60 NameError when the test expectation file cannot be retrieved from |url|.
62 """ 61 """
63 self.all_test_expectation_info = {} 62 self.all_test_expectation_info = {}
64 resp = urllib2.urlopen(url) 63 resp = urllib2.urlopen(url)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 111
113 # The modifiers left over should all be platform names. 112 # The modifiers left over should all be platform names.
114 test_expectation_info['Platforms'] = list(remaining_modifiers) 113 test_expectation_info['Platforms'] = list(remaining_modifiers)
115 114
116 # Shovel the expectations and modifiers in as "<key>: True" entries. Ugly, 115 # Shovel the expectations and modifiers in as "<key>: True" entries. Ugly,
117 # but required by the rest of the pipeline for parsing. 116 # but required by the rest of the pipeline for parsing.
118 for m in parsed.expectations + remaining_modifiers: 117 for m in parsed.expectations + remaining_modifiers:
119 test_expectation_info[m] = True 118 test_expectation_info[m] = True
120 119
121 return parsed.name, test_expectation_info 120 return parsed.name, test_expectation_info
OLDNEW
« no previous file with comments | « media/tools/layout_tests/README ('k') | media/tools/layout_tests/test_expectations_history.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698