2010-10-26 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Oct 2010 00:08:40 +0000 (00:08 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Oct 2010 00:08:40 +0000 (00:08 +0000)
        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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py

index a9a57b31ac36ba9c60c2d8a904d406410b2e9cbc..3d4f73f3b9cfbca865857773eaa69f9bf3b36b7e 100644 (file)
@@ -1,3 +1,20 @@
+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.
index c6c3066f355bd7c121a8eef6530dfa6eb0dd9efd..1cf88ef597f4573eec691fe09c64ba558483936b 100644 (file)
@@ -42,7 +42,6 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
 
     # 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
@@ -166,9 +165,6 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
         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)
index 508a6ad77edcd0109c2da218473e23e3167ea8da..67873a8cc0ab3179c7de35d5c9816ce340d34cb9 100644 (file)
@@ -43,7 +43,7 @@ _log = logging.getLogger("webkitpy.layout_tests.layout_package."
 
 # 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)
@@ -228,12 +228,11 @@ class TestExpectationsFile:
       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
@@ -241,7 +240,6 @@ class TestExpectationsFile:
 
     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
@@ -249,7 +247,7 @@ class TestExpectationsFile:
        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,
@@ -282,14 +280,12 @@ class TestExpectationsFile:
 
     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,
@@ -621,10 +617,6 @@ class TestExpectationsFile:
             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. '
@@ -773,8 +765,6 @@ class TestExpectationsFile:
 
         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)
 
index 2e1b6ecb24ffa88596f526c150961756ae976648..55eaf994b8d257c48b994c30096db1072e26c90d 100644 (file)
@@ -134,17 +134,12 @@ class TestExpectationsTest(Base):
             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)
@@ -227,11 +222,6 @@ BUGX DEFER : failures/expected = IMAGE
         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,
index cb4543043e426b31b9398de3335903d8efcfd513..92a31fbe46293a9bc52c5c59437140adf730f8a0 100644 (file)
@@ -121,7 +121,7 @@ class ChromiumPortTest(unittest.TestCase):
         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
index 8963d1c06a4c293cade6eb38c0d56f74a7e47442..14cf98740f10804f9c2eca85eed1ef8614063fa7 100755 (executable)
@@ -1011,16 +1011,13 @@ class TestRunner:
         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
@@ -1241,12 +1238,7 @@ class TestRunner:
                      (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,
index 747b8b402f7b21436ffb167058817d693e5b45e9..31f0b4088ef675b90001a35a4eb634951fb3cd21 100644 (file)
@@ -111,7 +111,7 @@ class TestExpectationsTestCase(unittest.TestCase):
             ["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"],
@@ -126,10 +126,6 @@ class TestExpectationsTestCase(unittest.TestCase):
             ["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(