Title: [137184] trunk/Tools
Revision
137184
Author
[email protected]
Date
2012-12-10 11:04:57 -0800 (Mon, 10 Dec 2012)

Log Message

webkit-patch print-expectations doesn't work right for platforms w/ shared expectations
https://bugs.webkit.org/show_bug.cgi?id=104405

Reviewed by Eric Seidel.

If multiple ports shared a TestExpectations file, webkit-patch
print-expectations would use the expectation for the first port
using that file and print the result for all ports, rather than
re-parse and print each port separately (e.g., we might print
the chromium-linux expectation for a file for both chromium-linux
and chromium-mac). Discovered while testing/debugging the fix
for bug 104403.

* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort._skipped_tests_for_unsupported_features):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(lint):
* Scripts/webkitpy/tool/commands/queries.py:
(PrintExpectations._model):
* Scripts/webkitpy/tool/commands/queries_unittest.py:
(PrintExpectationsTest.test_platform):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (137183 => 137184)


--- trunk/Tools/ChangeLog	2012-12-10 18:58:39 UTC (rev 137183)
+++ trunk/Tools/ChangeLog	2012-12-10 19:04:57 UTC (rev 137184)
@@ -1,5 +1,29 @@
 2012-12-10  Dirk Pranke  <[email protected]>
 
+        webkit-patch print-expectations doesn't work right for platforms w/ shared expectations
+        https://bugs.webkit.org/show_bug.cgi?id=104405
+
+        Reviewed by Eric Seidel.
+
+        If multiple ports shared a TestExpectations file, webkit-patch
+        print-expectations would use the expectation for the first port
+        using that file and print the result for all ports, rather than
+        re-parse and print each port separately (e.g., we might print
+        the chromium-linux expectation for a file for both chromium-linux
+        and chromium-mac). Discovered while testing/debugging the fix
+        for bug 104403.
+
+        * Scripts/webkitpy/layout_tests/port/test.py:
+        (TestPort._skipped_tests_for_unsupported_features):
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+        (lint):
+        * Scripts/webkitpy/tool/commands/queries.py:
+        (PrintExpectations._model):
+        * Scripts/webkitpy/tool/commands/queries_unittest.py:
+        (PrintExpectationsTest.test_platform):
+
+2012-12-10  Dirk Pranke  <[email protected]>
+
         nrwt: fix total number of tests computed in the result summary
         https://bugs.webkit.org/show_bug.cgi?id=104061
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py (137183 => 137184)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py	2012-12-10 18:58:39 UTC (rev 137183)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py	2012-12-10 19:04:57 UTC (rev 137184)
@@ -101,7 +101,7 @@
 # These numbers may need to be updated whenever we add or delete tests.
 #
 TOTAL_TESTS = 104
-TOTAL_SKIPS = 25
+TOTAL_SKIPS = 28
 TOTAL_RETRIES = 14
 
 UNEXPECTED_PASSES = 6
@@ -442,9 +442,7 @@
     def webkit_base(self):
         return '/test.checkout'
 
-    def skipped_layout_tests(self, test_list):
-        # This allows us to test the handling Skipped files, both with a test
-        # that actually passes, and a test that does fail.
+    def _skipped_tests_for_unsupported_features(self, test_list):
         return set(['failures/expected/skip_text.html',
                     'failures/unexpected/skip_pass.html',
                     'virtual/skipped'])

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (137183 => 137184)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2012-12-10 18:58:39 UTC (rev 137183)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2012-12-10 19:04:57 UTC (rev 137184)
@@ -69,6 +69,8 @@
 
     for port_to_lint in ports_to_lint:
         expectations_dict = port_to_lint.expectations_dict()
+
+        # FIXME: This won't work if multiple ports share a TestExpectations file but support different modifiers in the file.
         for expectations_file in expectations_dict.keys():
             if expectations_file in files_linted:
                 continue

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries.py (137183 => 137184)


--- trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2012-12-10 18:58:39 UTC (rev 137183)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2012-12-10 19:04:57 UTC (rev 137184)
@@ -514,10 +514,7 @@
 
     def _model(self, options, port_name, tests):
         port = self._tool.port_factory.get(port_name, options)
-        expectations_path = port.path_to_test_expectations_file()
-        if not expectations_path in self._expectation_models:
-            self._expectation_models[expectations_path] = TestExpectations(port, tests).model()
-        return self._expectation_models[expectations_path]
+        return TestExpectations(port, tests).model()
 
 
 class PrintBaselines(AbstractDeclarativeCommand):

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py (137183 => 137184)


--- trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py	2012-12-10 18:58:39 UTC (rev 137183)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py	2012-12-10 19:04:57 UTC (rev 137184)
@@ -227,6 +227,14 @@
                        'LayoutTests/platform/test-win-xp/TestExpectations\n'),
                       paths=True)
 
+    def test_platform(self):
+        self.run_test(['platform/test-mac-leopard/http/test.html'],
+                      ('// For test-mac-snowleopard\n'
+                       'platform/test-mac-leopard [ Pass Skip WontFix ]\n'  # Note that this is the expectation (from being skipped internally), not the test name
+                       '\n'
+                       '// For test-mac-leopard\n'
+                       'platform/test-mac-leopard/http/test.html [ Pass ]\n'),
+                      platform='test-mac-*')
 
 class PrintBaselinesTest(unittest.TestCase):
     def setUp(self):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to