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

Side by Side Diff: webkit/tools/layout_tests/layout_package/test_expectations.py

Issue 356007: Add a way to mark a test as missing expectations. We avoided added this... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « webkit/tools/layout_tests/layout_package/compare_failures.py ('k') | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2009 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 helper class for reading in and dealing with tests expectations 5 """A helper class for reading in and dealing with tests expectations
6 for layout tests. 6 for layout tests.
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
11 import re 11 import re
12 import sys 12 import sys
13 import time 13 import time
14 import path_utils 14 import path_utils
15 import compare_failures 15 import compare_failures
16 16
17 sys.path.append(path_utils.PathFromBase('third_party')) 17 sys.path.append(path_utils.PathFromBase('third_party'))
18 import simplejson 18 import simplejson
19 19
20 # Test expectation and modifier constants. 20 # Test expectation and modifier constants.
21 (PASS, FAIL, TEXT, IMAGE, IMAGE_PLUS_TEXT, TIMEOUT, CRASH, SKIP, WONTFIX, 21 (PASS, FAIL, TEXT, IMAGE, IMAGE_PLUS_TEXT, TIMEOUT, CRASH, SKIP, WONTFIX,
22 DEFER, SLOW, REBASELINE, NONE) = range(13) 22 DEFER, SLOW, REBASELINE, MISSING, NONE) = range(14)
23 23
24 # Test expectation file update action constants 24 # Test expectation file update action constants
25 (NO_CHANGE, REMOVE_TEST, REMOVE_PLATFORM, ADD_PLATFORMS_EXCEPT_THIS) = range(4) 25 (NO_CHANGE, REMOVE_TEST, REMOVE_PLATFORM, ADD_PLATFORMS_EXCEPT_THIS) = range(4)
26 26
27 class TestExpectations: 27 class TestExpectations:
28 TEST_LIST = "test_expectations.txt" 28 TEST_LIST = "test_expectations.txt"
29 29
30 def __init__(self, tests, directory, platform, is_debug_mode, is_lint_mode): 30 def __init__(self, tests, directory, platform, is_debug_mode, is_lint_mode):
31 """Reads the test expectations files from the given directory.""" 31 """Reads the test expectations files from the given directory."""
32 path = os.path.join(directory, self.TEST_LIST) 32 path = os.path.join(directory, self.TEST_LIST)
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 -If a test is included twice, then the more precise path wins. 209 -If a test is included twice, then the more precise path wins.
210 -CRASH tests cannot be DEFER or WONTFIX 210 -CRASH tests cannot be DEFER or WONTFIX
211 """ 211 """
212 212
213 EXPECTATIONS = { 'pass': PASS, 213 EXPECTATIONS = { 'pass': PASS,
214 'fail': FAIL, 214 'fail': FAIL,
215 'text': TEXT, 215 'text': TEXT,
216 'image': IMAGE, 216 'image': IMAGE,
217 'image+text': IMAGE_PLUS_TEXT, 217 'image+text': IMAGE_PLUS_TEXT,
218 'timeout': TIMEOUT, 218 'timeout': TIMEOUT,
219 'crash': CRASH } 219 'crash': CRASH,
220 'missing': MISSING }
220 221
221 PLATFORMS = [ 'mac', 'linux', 'win', 'win-xp', 'win-vista', 'win-7' ] 222 PLATFORMS = [ 'mac', 'linux', 'win', 'win-xp', 'win-vista', 'win-7' ]
222 223
223 BUILD_TYPES = [ 'debug', 'release' ] 224 BUILD_TYPES = [ 'debug', 'release' ]
224 225
225 MODIFIERS = { 'skip': SKIP, 226 MODIFIERS = { 'skip': SKIP,
226 'wontfix': WONTFIX, 227 'wontfix': WONTFIX,
227 'defer': DEFER, 228 'defer': DEFER,
228 'slow': SLOW, 229 'slow': SLOW,
229 'rebaseline': REBASELINE, 230 'rebaseline': REBASELINE,
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 def _AddError(self, lineno, msg, path): 677 def _AddError(self, lineno, msg, path):
677 """Reports an error that will prevent running the tests. Does not 678 """Reports an error that will prevent running the tests. Does not
678 immediately raise an exception because we'd like to aggregate all the 679 immediately raise an exception because we'd like to aggregate all the
679 errors so they can all be printed out.""" 680 errors so they can all be printed out."""
680 self._errors.append('\nLine:%s %s %s' % (lineno, msg, path)) 681 self._errors.append('\nLine:%s %s %s' % (lineno, msg, path))
681 682
682 def _LogNonFatalError(self, lineno, msg, path): 683 def _LogNonFatalError(self, lineno, msg, path):
683 """Reports an error that will not prevent running the tests. These are 684 """Reports an error that will not prevent running the tests. These are
684 still errors, but not bad enough to warrant breaking test running.""" 685 still errors, but not bad enough to warrant breaking test running."""
685 self._non_fatal_errors.append('Line:%s %s %s' % (lineno, msg, path)) 686 self._non_fatal_errors.append('Line:%s %s %s' % (lineno, msg, path))
OLDNEW
« no previous file with comments | « webkit/tools/layout_tests/layout_package/compare_failures.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698