Diff
Modified: trunk/Tools/ChangeLog (110512 => 110513)
--- trunk/Tools/ChangeLog 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/ChangeLog 2012-03-13 00:43:10 UTC (rev 110513)
@@ -1,3 +1,34 @@
+2012-03-12 Dirk Pranke <[email protected]>
+
+ _runtime_feature_list isn't supported on Apple Mac DRT
+ https://bugs.webkit.org/show_bug.cgi?id=80906
+
+ Reviewed by Eric Seidel.
+
+ It looks like this feature is actually only supported on the Win
+ DRT port, so this patch reworks the code to make that clearer
+ and reduce unnecessary overrides.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort._path_to_webcore_library):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._path_to_webcore_library):
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._skipped_file_search_paths):
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ (WebKitPort._runtime_feature_list):
+ * Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
+ (TestWebKitPort.__init__):
+ (TestWebKitPort.all_test_configurations):
+ (test_skipped_directories_for_features):
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort):
+ (WinPort._runtime_feature_list):
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest.test_operating_system):
+ (WinPortTest):
+ (WinPortTest.test_runtime_feature_list):
+
2012-03-12 Peter Beverloo <[email protected]>
[Chromium] Temporary build-fix for the Android bot
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -61,10 +61,6 @@
dyn_path = self._build_path('WebCore', 'libwebcore_efl.so')
return static_path if self._filesystem.exists(static_path) else dyn_path
- def _runtime_feature_list(self):
- # FIXME: EFL should detect runtime features like other webkit ports do.
- return None
-
def show_results_html_file(self, results_filename):
# FIXME: We should find a way to share this implmentation with Gtk,
# or teach run-launcher how to call run-safari and move this down to WebKitPort.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -136,9 +136,6 @@
return full_library
return None
- def _runtime_feature_list(self):
- return None
-
# FIXME: We should find a way to share this implmentation with Gtk,
# or teach run-launcher how to call run-safari and move this down to WebKitPort.
def show_results_html_file(self, results_filename):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -132,9 +132,6 @@
search_paths.add('qt-5.0-wk1')
return search_paths
- def _runtime_feature_list(self):
- return None
-
def setup_environ_for_server(self, server_name=None):
clean_env = WebKitPort.setup_environ_for_server(self, server_name)
clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -250,21 +250,9 @@
return dirs_to_skip
def _runtime_feature_list(self):
- """Return the supported features of DRT. If a port doesn't support
- this DRT switch, it has to override this method to return None"""
- supported_features_command = [self._path_to_driver(), '--print-supported-features']
- try:
- output = self._executive.run_command(supported_features_command, error_handler=Executive.ignore_error)
- except OSError, e:
- _log.warn("Exception running driver: %s, %s. Driver must be built before calling WebKitPort.test_expectations()." % (supported_features_command, e))
- return None
+ """If a port makes certain features available only through runtime flags, it can override this routine to indicate which ones are available."""
+ return None
- # Note: win/DumpRenderTree.cpp does not print a leading space before the features_string.
- match_object = re.match("SupportedFeatures:\s*(?P<features_string>.*)\s*", output)
- if not match_object:
- return None
- return match_object.group('features_string').split(' ')
-
def _webcore_symbols_string(self):
webcore_library_path = self._path_to_webcore_library()
if not webcore_library_path:
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -41,20 +41,16 @@
class TestWebKitPort(WebKitPort):
port_name = "testwebkitport"
- def __init__(self, symbols_string=None, feature_list=None,
+ def __init__(self, symbols_string=None,
expectations_file=None, skips_file=None, host=None,
**kwargs):
self.symbols_string = symbols_string # Passing "" disables all staticly-detectable features.
- self.feature_list = feature_list # Passing [] disables all runtime-detectable features.
host = host or MockSystemHost()
WebKitPort.__init__(self, host=host, **kwargs)
def all_test_configurations(self):
return [self.test_configuration()]
- def _runtime_feature_list(self):
- return self.feature_list
-
def _webcore_symbols_string(self):
return self.symbols_string
@@ -125,18 +121,12 @@
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_runtime_feature_list(self):
- port = WebKitPort(MockSystemHost())
- port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
- # runtime_features_list returns None when its results are meaningless (it couldn't run DRT or parse the output, etc.)
- self.assertEquals(port._runtime_feature_list(), None)
- port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
- self.assertEquals(port._runtime_feature_list(), ['foo', 'bar'])
-
def test_skipped_directories_for_features(self):
supported_features = ["Accelerated Compositing", "Foo Feature"]
expected_directories = set(["animations/3d", "transforms/3d"])
- result_directories = set(TestWebKitPort(None, supported_features)._skipped_tests_for_unsupported_features(test_list=["animations/3d/foo.html"]))
+ port = TestWebKitPort(None, supported_features)
+ port._runtime_feature_list = lambda: supported_features
+ result_directories = set(port._skipped_tests_for_unsupported_features(test_list=["animations/3d/foo.html"]))
self.assertEqual(result_directories, expected_directories)
def test_skipped_directories_for_features_no_matching_tests_in_test_list(self):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -30,7 +30,7 @@
import re
import sys
-from webkitpy.common.system.executive import ScriptError
+from webkitpy.common.system.executive import ScriptError, Executive
from webkitpy.common.system.path import abspath_to_uri
from webkitpy.layout_tests.port.apple import ApplePort
@@ -80,3 +80,17 @@
# FIXME: webkitperl/httpd.pm installs /usr/lib/apache/libphp4.dll on cycwin automatically
# as part of running old-run-webkit-tests. That's bad design, but we may need some similar hack.
# We might use setup_environ_for_server for such a hack (or modify apache_http_server.py).
+
+ def _runtime_feature_list(self):
+ supported_features_command = [self._path_to_driver(), '--print-supported-features']
+ try:
+ output = self._executive.run_command(supported_features_command, error_handler=Executive.ignore_error)
+ except OSError, e:
+ _log.warn("Exception running driver: %s, %s. Driver must be built before calling WebKitPort.test_expectations()." % (supported_features_command, e))
+ return None
+
+ # Note: win/DumpRenderTree.cpp does not print a leading space before the features_string.
+ match_object = re.match("SupportedFeatures:\s*(?P<features_string>.*)\s*", output)
+ if not match_object:
+ return None
+ return match_object.group('features_string').split(' ')
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py (110512 => 110513)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2012-03-13 00:31:25 UTC (rev 110512)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2012-03-13 00:43:10 UTC (rev 110513)
@@ -95,3 +95,11 @@
def test_operating_system(self):
self.assertEqual('win', self.make_port().operating_system())
+
+ def test_runtime_feature_list(self):
+ port = self.make_port()
+ port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
+ # runtime_features_list returns None when its results are meaningless (it couldn't run DRT or parse the output, etc.)
+ self.assertEquals(port._runtime_feature_list(), None)
+ port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
+ self.assertEquals(port._runtime_feature_list(), ['foo', 'bar'])