Diff
Modified: trunk/Tools/ChangeLog (137649 => 137650)
--- trunk/Tools/ChangeLog 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/ChangeLog 2012-12-13 21:53:06 UTC (rev 137650)
@@ -1,3 +1,32 @@
+2012-12-13 Dirk Pranke <dpra...@chromium.org>
+
+ support -wk2 port names properly in webkitpy.layout_tests.port
+ https://bugs.webkit.org/show_bug.cgi?id=104761
+
+ Reviewed by Eric Seidel.
+
+ Our support for WK2 port names was inconsistent at best; this patch
+ modifies the code so that <port_name>-wk2 is supported for all ports that
+ have WK2 implementations and is equivalent to specifying <port_name>
+ and -2/--webkit-test-runner. In addition, this modifies
+ builders.all_port_names() to include the wk2 variants.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort.determine_full_port_name):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.determine_full_port_name):
+ (Port.__init__):
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+ (DriverTest.make_port):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.default_baseline_search_path):
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort.default_baseline_search_path):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+
2012-12-13 Ian Vollick <voll...@chromium.org>
[chromium] Add a virtual test suite for enabling opt-in to composited scrolling
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -60,10 +60,6 @@
'mac-future': ['LayoutTests/platform/mac-future', 'LayoutTests/platform/mac', 'LayoutTests'],
'win-future': ['LayoutTests/platform/win-future', 'LayoutTests/platform/win', 'LayoutTests'],
'qt-unknown': ['LayoutTests/platform/qt-unknown', 'LayoutTests/platform/qt', 'LayoutTests'],
-
- # FIXME: Account for the efl-wk2 port which isn't returned in builders.all_port_names().
- # See https://bugs.webkit.org/show_bug.cgi?id=104761.
- 'efl-wk2': ['LayoutTests/platform/efl-wk2', 'LayoutTests/platform/efl', 'LayoutTests'],
}
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -55,17 +55,21 @@
@classmethod
def determine_full_port_name(cls, host, options, port_name):
- # If the port_name matches the (badly named) cls.port_name, that
- # means that they passed 'mac' or 'win' and didn't specify a version.
- # That convention means that we're supposed to use the version currently
- # being run, so this won't work if you're not on mac or win (respectively).
- # If you're not on the o/s in question, you must specify a full version or -future (cf. above).
- if port_name == cls.port_name:
- assert port_name == host.platform.os_name
- return cls.port_name + '-' + host.platform.os_version
- if port_name == cls.port_name + '-wk2':
- assert port_name == host.platform.os_name + '-wk2'
- return cls.port_name + '-' + host.platform.os_version + '-wk2'
+ options = options or {}
+ if port_name in (cls.port_name, cls.port_name + '-wk2'):
+ # If the port_name matches the (badly named) cls.port_name, that
+ # means that they passed 'mac' or 'win' and didn't specify a version.
+ # That convention means that we're supposed to use the version currently
+ # being run, so this won't work if you're not on mac or win (respectively).
+ # If you're not on the o/s in question, you must specify a full version or -future (cf. above).
+ assert host.platform.os_name in port_name
+ if port_name == cls.port_name and not getattr(options, 'webkit_test_runner', False):
+ port_name = cls.port_name + '-' + host.platform.os_version
+ else:
+ port_name = cls.port_name + '-' + host.platform.os_version + '-wk2'
+ elif getattr(options, 'webkit_test_runner', False) and '-wk2' not in port_name:
+ port_name += '-wk2'
+
return port_name
def _strip_port_name_prefix(self, port_name):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -88,7 +88,11 @@
def determine_full_port_name(cls, host, options, port_name):
"""Return a fully-specified port name that can be used to construct objects."""
# Subclasses will usually override this.
- return cls.port_name
+ options = options or {}
+ assert port_name.startswith(cls.port_name)
+ if getattr(options, 'webkit_test_runner', False) and not '-wk2' in port_name:
+ return port_name + '-wk2'
+ return port_name
def __init__(self, host, port_name=None, options=None, **kwargs):
@@ -107,6 +111,9 @@
# options defined on it.
self._options = options or optparse.Values()
+ if self._name and '-wk2' in self._name:
+ self._options.webkit_test_runner = True
+
self.host = host
self._executive = host.executive
self._filesystem = host.filesystem
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/builders.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/builders.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/builders.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -62,12 +62,12 @@
# These builders are on build.webkit.org.
"Apple MountainLion Release WK1 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion"]), "rebaseline_override_dir": "mac"},
"Apple MountainLion Debug WK1 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion", "debug"]), "rebaseline_override_dir": "mac"},
- "Apple MountainLion Release WK2 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion", "wk2"]), "rebaseline_override_dir": "mac"},
- "Apple MountainLion Debug WK2 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion", "wk2", "debug"]), "rebaseline_override_dir": "mac"},
+ "Apple MountainLion Release WK2 (Tests)": {"port_name": "mac-mountainlion-wk2", "specifiers": set(["mountainlion", "wk2"]), "rebaseline_override_dir": "mac"},
+ "Apple MountainLion Debug WK2 (Tests)": {"port_name": "mac-mountainlion-wk2", "specifiers": set(["mountainlion", "wk2", "debug"]), "rebaseline_override_dir": "mac"},
"Apple Lion Release WK1 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion"])},
"Apple Lion Debug WK1 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion", "debug"])},
- "Apple Lion Release WK2 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion", "wk2"])},
- "Apple Lion Debug WK2 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion", "wk2", "debug"])},
+ "Apple Lion Release WK2 (Tests)": {"port_name": "mac-lion-wk2", "specifiers": set(["lion", "wk2"])},
+ "Apple Lion Debug WK2 (Tests)": {"port_name": "mac-lion-wk2", "specifiers": set(["lion", "wk2", "debug"])},
"Apple Win XP Debug (Tests)": {"port_name": "win-xp", "specifiers": set(["win", "debug"])},
# FIXME: Remove rebaseline_override_dir once there is an Apple buildbot that corresponds to platform/win.
@@ -76,14 +76,14 @@
"GTK Linux 32-bit Release": {"port_name": "gtk", "specifiers": set(["gtk", "x86", "release"])},
"GTK Linux 64-bit Debug": {"port_name": "gtk", "specifiers": set(["gtk", "x86_64", "debug"])},
"GTK Linux 64-bit Release": {"port_name": "gtk", "specifiers": set(["gtk", "x86_64", "release"])},
- "GTK Linux 64-bit Release WK2 (Tests)": {"port_name": "gtk", "specifiers": set(["gtk", "x86_64", "wk2", "release"])},
+ "GTK Linux 64-bit Release WK2 (Tests)": {"port_name": "gtk-wk2", "specifiers": set(["gtk", "x86_64", "wk2", "release"])},
# FIXME: Remove rebaseline_override_dir once there are Qt bots for all the platform/qt-* directories.
"Qt Linux Release": {"port_name": "qt-linux", "specifiers": set(["win", "linux", "mac"]), "rebaseline_override_dir": "qt"},
"EFL Linux 64-bit Release": {"port_name": "efl", "specifiers": set(["efl", "release"])},
- "EFL Linux 64-bit Release WK2": {"port_name": "efl", "specifiers": set(["efl", "wk2", "release"])},
- "EFL Linux 64-bit Debug WK2": {"port_name": "efl", "specifiers": set(["efl", "wk2", "debug"])},
+ "EFL Linux 64-bit Release WK2": {"port_name": "efl-wk2", "specifiers": set(["efl", "wk2", "release"])},
+ "EFL Linux 64-bit Debug WK2": {"port_name": "efl-wk2", "specifiers": set(["efl", "wk2", "debug"])},
}
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -82,7 +82,7 @@
class DriverTest(unittest.TestCase):
def make_port(self):
- port = Port(MockSystemHost(), MockOptions(configuration='Release'))
+ port = Port(MockSystemHost(), 'test', MockOptions(configuration='Release'))
port._config.build_directory = lambda configuration: '/mock-build'
return port
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -73,10 +73,11 @@
return True
def default_baseline_search_path(self):
- if self._name.endswith(self.FUTURE_VERSION):
+ name = self._name.replace('-wk2', '')
+ if name.endswith(self.FUTURE_VERSION):
fallback_names = [self.port_name]
else:
- fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(self._name):-1] + [self.port_name]
+ fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(name):-1] + [self.port_name]
if self.get_option('webkit_test_runner'):
fallback_names.insert(0, self._wk2_port_name())
# Note we do not add 'wk2' here, even though it's included in _skipped_search_paths().
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -61,10 +61,11 @@
return expected_text != actual_text
def default_baseline_search_path(self):
- if self._name.endswith(self.FUTURE_VERSION):
+ name = self._name.replace('-wk2', '')
+ if name.endswith(self.FUTURE_VERSION):
fallback_names = [self.port_name]
else:
- fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(self._name):-1] + [self.port_name]
+ fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(name):-1] + [self.port_name]
# FIXME: The AppleWin port falls back to AppleMac for some results. Eventually we'll have a shared 'apple' port.
if self.get_option('webkit_test_runner'):
fallback_names.insert(0, 'win-wk2')
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py (137649 => 137650)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py 2012-12-13 21:50:52 UTC (rev 137649)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py 2012-12-13 21:53:06 UTC (rev 137650)
@@ -336,7 +336,7 @@
# FIXME: change this to use the test- ports.
calls = filter(lambda x: x != ['qmake', '-v'], self.tool.executive.calls)
self.assertTrue(len(calls) == 1)
- self.assertTrue(len(calls[0]) == 26)
+ self.assertTrue(len(calls[0]) == 34)
def test_rebaseline_expectations_noop(self):
self._zero_out_test_expectations()