+2010-10-26 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ remove DEFER support from new-run-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=48387
+
+ DEFER was needed when we were trying to ship Chrome beta.
+ Now it's just extra complication.
+
+ * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+
2010-10-26 Eric Seidel <eric@webkit.org>
Unreviewed. Adding import with_statement to fix python 2.5.
# Additional JSON fields.
WONTFIX = "wontfixCounts"
- DEFERRED = "deferredCounts"
# Note that we omit test_expectations.FAIL from this list because
# it should never show up (it's a legacy input expectation, never
self._insert_item_into_raw_list(results_for_builder,
len(self._expectations.get_tests_with_timeline(
test_expectations.NOW)), self.ALL_FIXABLE_COUNT)
- self._insert_item_into_raw_list(results_for_builder,
- self._get_failure_summary_entry(test_expectations.DEFER),
- self.DEFERRED)
self._insert_item_into_raw_list(results_for_builder,
self._get_failure_summary_entry(test_expectations.WONTFIX),
self.WONTFIX)
# Test expectation and modifier constants.
(PASS, FAIL, TEXT, IMAGE, IMAGE_PLUS_TEXT, TIMEOUT, CRASH, SKIP, WONTFIX,
- DEFER, SLOW, REBASELINE, MISSING, FLAKY, NOW, NONE) = range(16)
+ SLOW, REBASELINE, MISSING, FLAKY, NOW, NONE) = range(15)
# Test expectation file update action constants
(NO_CHANGE, REMOVE_TEST, REMOVE_PLATFORM, ADD_PLATFORMS_EXCEPT_THIS) = range(4)
DEBUG : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
LINUX DEBUG SKIP : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
- DEFER LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
+ LINUX WIN : LayoutTests/fast/js/no-good.js = TIMEOUT PASS
SKIP: Doesn't run the test.
SLOW: The test takes a long time to run, but does not timeout indefinitely.
WONTFIX: For tests that we never intend to pass on a given platform.
- DEFER: Test does not count in our statistics for the current release.
DEBUG: Expectations apply only to the debug build.
RELEASE: Expectations apply only to release build.
LINUX/WIN/WIN-XP/WIN-VISTA/WIN-7/MAC: Expectations apply only to these
Notes:
-A test cannot be both SLOW and TIMEOUT
- -A test cannot be both DEFER and WONTFIX
-A test should only be one of IMAGE, TEXT, IMAGE+TEXT, or FAIL. FAIL is
a migratory state that currently means either IMAGE, TEXT, or
IMAGE+TEXT. Once we have finished migrating the expectations, we will
identifier.
-A test can be included twice, but not via the same path.
-If a test is included twice, then the more precise path wins.
- -CRASH tests cannot be DEFER or WONTFIX
+ -CRASH tests cannot be WONTFIX
"""
EXPECTATIONS = {'pass': PASS,
MODIFIERS = {'skip': SKIP,
'wontfix': WONTFIX,
- 'defer': DEFER,
'slow': SLOW,
'rebaseline': REBASELINE,
'none': NONE}
TIMELINES = {'wontfix': WONTFIX,
- 'now': NOW,
- 'defer': DEFER}
+ 'now': NOW}
RESULT_TYPES = {'skip': SKIP,
'pass': PASS,
if not self._is_debug_mode and 'release' not in options:
return False
- if 'wontfix' in options and 'defer' in options:
- self._add_error(lineno, 'Test cannot be both DEFER and WONTFIX.',
- test_and_expectations)
-
if self._is_lint_mode and 'rebaseline' in options:
self._add_error(lineno,
'REBASELINE should only be used for running rebaseline.py. '
if 'wontfix' in modifiers:
self._timeline_to_tests[WONTFIX].add(test)
- elif 'defer' in modifiers:
- self._timeline_to_tests[DEFER].add(test)
else:
self._timeline_to_tests[NOW].add(test)
self.get_test('failures/expected/text.html')),
set([TEXT, CRASH]))
- def test_defer(self):
- self.parse_exp('BUGX DEFER : failures/expected/text.html = TEXT')
- self.assertEqual(self._exp.get_options(
- self.get_test('failures/expected/text.html')), ['bugx', 'defer'])
-
def test_precedence(self):
# This tests handling precedence of specific lines over directories
# and tests expectations covering entire directories.
exp_str = """
BUGX : failures/expected/text.html = TEXT
-BUGX DEFER : failures/expected = IMAGE
+BUGX WONTFIX : failures/expected = IMAGE
"""
self.parse_exp(exp_str)
self.assert_exp('failures/expected/text.html', TEXT)
self.assertRaises(SyntaxError, self.parse_exp,
'BUG_TEST SLOW : failures/expected/timeout.html = TIMEOUT')
- def test_semantic_wontfix_defer(self):
- # A test cannot be WONTFIX and DEFER.
- self.assertRaises(SyntaxError, self.parse_exp,
- 'BUG_TEST WONTFIX DEFER : failures/expected/text.html = TEXT')
-
def test_semantic_rebaseline(self):
# Can't lint a file w/ 'REBASELINE' in it.
self.assertRaises(SyntaxError, self.parse_exp,
fake_test = os.path.join(port.layout_tests_dir(), "fast/js/not-good.js")
port.test_expectations = lambda: """BUG_TEST SKIP : fast/js/not-good.js = TEXT
-DEFER LINUX WIN : fast/js/very-good.js = TIMEOUT PASS"""
+LINUX WIN : fast/js/very-good.js = TIMEOUT PASS"""
port.test_expectations_overrides = lambda: ''
port.tests = lambda paths: set()
port.path_exists = lambda test: True
tests = self._expectations.get_tests_with_result_type(result_type)
now = result_summary.tests_by_timeline[test_expectations.NOW]
wontfix = result_summary.tests_by_timeline[test_expectations.WONTFIX]
- defer = result_summary.tests_by_timeline[test_expectations.DEFER]
# We use a fancy format string in order to print the data out in a
# nicely-aligned table.
- fmtstr = ("Expect: %%5d %%-8s (%%%dd now, %%%dd defer, %%%dd wontfix)"
- % (self._num_digits(now), self._num_digits(defer),
- self._num_digits(wontfix)))
+ fmtstr = ("Expect: %%5d %%-8s (%%%dd now, %%%dd wontfix)"
+ % (self._num_digits(now), self._num_digits(wontfix)))
self._printer.print_expected(fmtstr %
- (len(tests), result_type_str, len(tests & now),
- len(tests & defer), len(tests & wontfix)))
+ (len(tests), result_type_str, len(tests & now), len(tests & wontfix)))
def _num_digits(self, num):
"""Returns the number of digits needed to represent the length of a
(passed, total, pct_passed))
self._printer.print_actual("")
self._print_result_summary_entry(result_summary,
- test_expectations.NOW, "Tests to be fixed for the current release")
-
- self._printer.print_actual("")
- self._print_result_summary_entry(result_summary,
- test_expectations.DEFER,
- "Tests we'll fix in the future if they fail (DEFER)")
+ test_expectations.NOW, "Tests to be fixed")
self._printer.print_actual("")
self._print_result_summary_entry(result_summary,
["BUG1234 DEBUG MAC : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
- ["SLOW DEFER BUG1234 : passes/text.html = PASS"],
+ ["SLOW BUG1234 : passes/text.html = PASS"],
"")
self.assert_lines_lint(
["WONTFIX SKIP : passes/text.html = TIMEOUT"],
["SKIP : passes/text.html = PASS"],
"Test lacks BUG modifier. "
"passes/text.html [test/expectations] [2]")
- self.assert_lines_lint(
- ["WONTFIX DEFER : passes/text.html = PASS"],
- "Test cannot be both DEFER and WONTFIX. "
- "passes/text.html [test/expectations] [5]")
def test_expectation_errors(self):
self.assert_lines_lint(