Remove skip function based on symbol lookup in layout tests
authorTaehwan Kim <taehwan8.kim@samsung.com>
Tue, 18 Jun 2013 00:44:13 +0000 (09:44 +0900)
committerTaehwan Kim <taehwan8.kim@samsung.com>
Tue, 18 Jun 2013 07:23:02 +0000 (16:23 +0900)
[Title] Remove skip function based on symbol lookup in layout tests
[Issue#] N/A
[Problem] Working feature has been skipped in layout tests.
[Cause] Skip function based on symbol lookup causes this happening and it is useless since we have test expectation file.
[Solution] Remove symbol-based skipped list detection.
           - Tools/Scripts/webkitpy/layout_tests/port/webkit.py
             (_missing_symbol_to_skipped_tests)
             (_skipped_tests_for_unsupported_features)
           - Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py
             (test_skipped_directories_for_symbols)

Change-Id: I05b3facbbbfb263418dd9ed6bd43e562b09ef3b7

Tools/Scripts/webkitpy/layout_tests/port/webkit.py
Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py

index d5b7c0d..067c033 100755 (executable)
@@ -220,23 +220,6 @@ class WebKitPort(Port):
             "3D Rendering": ["animations/3d", "transforms/3d"],
         }
 
-    # Ports which use compile-time feature detection should define this method and return
-    # a dictionary mapping from symbol substrings to possibly disabled test directories.
-    # When the symbol substrings are not matched, the directories will be skipped.
-    # If ports don't ever enable certain features, then those directories can just be
-    # in the Skipped list instead of compile-time-checked here.
-    def _missing_symbol_to_skipped_tests(self):
-        """Return the supported feature dictionary. The keys are symbol-substrings
-        and the values are the lists of directories to skip if that symbol is missing."""
-        return {
-            "MathMLElement": ["mathml"],
-            "GraphicsLayer": ["compositing"],
-            "WebCoreHas3DRendering": ["animations/3d", "transforms/3d"],
-            "WebGLShader": ["fast/canvas/webgl", "compositing/webgl", "http/tests/canvas/webgl"],
-            "MHTMLArchive": ["mhtml"],
-            "CSSVariableValue": ["fast/css/variables", "inspector/styles/variables"],
-        }
-
     def _has_test_in_directories(self, directory_lists, test_list):
         if not test_list:
             return False
@@ -259,15 +242,6 @@ class WebKitPort(Port):
             if supported_feature_list is not None:
                 return reduce(operator.add, [directories for feature, directories in self._missing_feature_to_skipped_tests().items() if feature not in supported_feature_list])
 
-        # Only check the symbols of there are tests in the test_list that might get skipped.
-        # This is a performance optimization to avoid the calling nm.
-        if self._has_test_in_directories(self._missing_symbol_to_skipped_tests().values(), test_list):
-            # Runtime feature detection not supported, fallback to static dectection:
-            # Disable any tests for symbols missing from the executable or libraries.
-            symbols_string = self._symbols_string()
-            if symbols_string is not None:
-                return reduce(operator.add, [directories for symbol_substring, directories in self._missing_symbol_to_skipped_tests().items() if symbol_substring not in symbols_string], [])
-
         # Failed to get any runtime or symbol information, don't skip any tests.
         return []
 
index 0781825..86811a3 100755 (executable)
@@ -90,33 +90,6 @@ class WebKitPortTest(port_testcase.PortTestCase):
         port._options = MockOptions(webkit_test_runner=False)
         self.assertEqual(port.path_to_test_expectations_file(), '/mock-checkout/LayoutTests/platform/testwebkitport/TestExpectations')
 
-    def test_skipped_directories_for_symbols(self):
-        # This first test confirms that the commonly found symbols result in the expected skipped directories.
-        symbols_string = " ".join(["GraphicsLayer", "WebCoreHas3DRendering", "isXHTMLMPDocument", "fooSymbol"])
-        expected_directories = set([
-            "mathml",  # Requires MathMLElement
-            "fast/canvas/webgl",  # Requires WebGLShader
-            "compositing/webgl",  # Requires WebGLShader
-            "http/tests/canvas/webgl",  # Requires WebGLShader
-            "mhtml",  # Requires MHTMLArchive
-            "fast/css/variables",  # Requires CSS Variables
-            "inspector/styles/variables",  # Requires CSS Variables
-        ])
-
-        result_directories = set(TestWebKitPort(symbols_string, None)._skipped_tests_for_unsupported_features(test_list=['mathml/foo.html']))
-        self.assertEqual(result_directories, expected_directories)
-
-        # Test that the nm string parsing actually works:
-        symbols_string = """
-000000000124f498 s __ZZN7WebCore13GraphicsLayer12replaceChildEPS0_S1_E19__PRETTY_FUNCTION__
-000000000124f500 s __ZZN7WebCore13GraphicsLayer13addChildAboveEPS0_S1_E19__PRETTY_FUNCTION__
-000000000124f670 s __ZZN7WebCore13GraphicsLayer13addChildBelowEPS0_S1_E19__PRETTY_FUNCTION__
-"""
-        # Note 'compositing' is not in the list of skipped directories (hence the parsing of GraphicsLayer worked):
-        expected_directories = set(['mathml', 'transforms/3d', 'compositing/webgl', 'fast/canvas/webgl', 'animations/3d', 'mhtml', 'http/tests/canvas/webgl', 'fast/css/variables', 'inspector/styles/variables'])
-        result_directories = set(TestWebKitPort(symbols_string, None)._skipped_tests_for_unsupported_features(test_list=['mathml/foo.html']))
-        self.assertEqual(result_directories, expected_directories)
-
     def test_skipped_directories_for_features(self):
         supported_features = ["Accelerated Compositing", "Foo Feature"]
         expected_directories = set(["animations/3d", "transforms/3d"])