Log Message
REGRESSION (r229955): run-webkit-tests runs tests in skipped directories and subdirectories of directory given on command line https://bugs.webkit.org/show_bug.cgi?id=185054 <rdar://problem/39773209>
Reviewed by Ryosuke Niwa. Fallback to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions. Darwin-based ports have OS version-specific test expectations and are certified to support running tests using the currently shipping OS by way of a hardcoded class variable CURRENT_VERSION. The run-webkit-tests script depends on the OS version to find the applicable TestExpectations files to parse to compute the list of skipped tests for the port. * Scripts/webkitpy/port/mac.py: (MacPort.__init__): Fall back to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions. * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_factory_with_future_version): Added. (MacTest.test_factory_with_future_version_and_apple_additions): Renamed from MacTest.test_factory_with_future_version() and added code to use the mock Apple Additions so that running this code with- and without- the real Apple Additions produces consistent results now that the Mac port's OS version falls back to MacPort.CURRENT_VERSION when Apple Additions is absent.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (231448 => 231449)
--- trunk/Tools/ChangeLog 2018-05-07 18:27:25 UTC (rev 231448)
+++ trunk/Tools/ChangeLog 2018-05-07 18:32:46 UTC (rev 231449)
@@ -1,3 +1,28 @@
+2018-05-07 Daniel Bates <daba...@apple.com>
+
+ REGRESSION (r229955): run-webkit-tests runs tests in skipped directories and subdirectories of directory given on command line
+ https://bugs.webkit.org/show_bug.cgi?id=185054
+ <rdar://problem/39773209>
+
+ Reviewed by Ryosuke Niwa.
+
+ Fallback to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions.
+
+ Darwin-based ports have OS version-specific test expectations and are certified to support running tests using
+ the currently shipping OS by way of a hardcoded class variable CURRENT_VERSION. The run-webkit-tests script
+ depends on the OS version to find the applicable TestExpectations files to parse to compute the list of skipped
+ tests for the port.
+
+ * Scripts/webkitpy/port/mac.py:
+ (MacPort.__init__): Fall back to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not
+ have Apple Additions.
+ * Scripts/webkitpy/port/mac_unittest.py:
+ (MacTest.test_factory_with_future_version): Added.
+ (MacTest.test_factory_with_future_version_and_apple_additions): Renamed from MacTest.test_factory_with_future_version()
+ and added code to use the mock Apple Additions so that running this code with- and without- the real Apple Additions
+ produces consistent results now that the Mac port's OS version falls back to MacPort.CURRENT_VERSION when Apple Additions
+ is absent.
+
2018-05-07 Brian Burg <bb...@apple.com>
Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (231448 => 231449)
--- trunk/Tools/Scripts/webkitpy/port/mac.py 2018-05-07 18:27:25 UTC (rev 231448)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py 2018-05-07 18:32:46 UTC (rev 231449)
@@ -60,7 +60,7 @@
split_port_name = port_name.split('-')
if len(split_port_name) > 1 and split_port_name[1] != 'wk2':
self._os_version = version_name_map.from_name(split_port_name[1])[1]
- elif self.host.platform.is_mac():
+ elif self.host.platform.is_mac() and apple_additions():
self._os_version = self.host.platform.os_version
if not self._os_version:
self._os_version = MacPort.CURRENT_VERSION
Modified: trunk/Tools/Scripts/webkitpy/port/mac_unittest.py (231448 => 231449)
--- trunk/Tools/Scripts/webkitpy/port/mac_unittest.py 2018-05-07 18:27:25 UTC (rev 231448)
+++ trunk/Tools/Scripts/webkitpy/port/mac_unittest.py 2018-05-07 18:32:46 UTC (rev 231449)
@@ -34,6 +34,7 @@
from webkitpy.tool.mocktool import MockOptions
from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2, ScriptError
from webkitpy.common.version import Version
+from webkitpy.common.version_name_map import VersionNameMap
class MacTest(darwin_testcase.DarwinTest):
@@ -159,20 +160,38 @@
def test_factory_with_future_version(self):
port = self.make_port(options=MockOptions(webkit_test_runner=True), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac')
self.assertEqual(port.driver_name(), 'WebKitTestRunner')
- self.assertEqual(port.version_name(), None)
+ self.assertEqual(port.version_name(), VersionNameMap().to_name(MacPort.CURRENT_VERSION, platform=MacPort.port_name))
port = self.make_port(options=MockOptions(webkit_test_runner=False), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac')
self.assertEqual(port.driver_name(), 'DumpRenderTree')
- self.assertEqual(port.version_name(), None)
+ self.assertEqual(port.version_name(), VersionNameMap().to_name(MacPort.CURRENT_VERSION, platform=MacPort.port_name))
port = self.make_port(options=MockOptions(webkit_test_runner=False), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac-wk2')
self.assertEqual(port.driver_name(), 'WebKitTestRunner')
- self.assertEqual(port.version_name(), None)
+ self.assertEqual(port.version_name(), VersionNameMap().to_name(MacPort.CURRENT_VERSION, platform=MacPort.port_name))
port = self.make_port(options=MockOptions(webkit_test_runner=True), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac-wk2')
self.assertEqual(port.driver_name(), 'WebKitTestRunner')
- self.assertEqual(port.version_name(), None)
+ self.assertEqual(port.version_name(), VersionNameMap().to_name(MacPort.CURRENT_VERSION, platform=MacPort.port_name))
+ def test_factory_with_future_version_and_apple_additions(self):
+ with port_testcase.bind_mock_apple_additions():
+ port = self.make_port(options=MockOptions(webkit_test_runner=True), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac')
+ self.assertEqual(port.driver_name(), 'WebKitTestRunner')
+ self.assertEqual(port.version_name(), None)
+
+ port = self.make_port(options=MockOptions(webkit_test_runner=False), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac')
+ self.assertEqual(port.driver_name(), 'DumpRenderTree')
+ self.assertEqual(port.version_name(), None)
+
+ port = self.make_port(options=MockOptions(webkit_test_runner=False), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac-wk2')
+ self.assertEqual(port.driver_name(), 'WebKitTestRunner')
+ self.assertEqual(port.version_name(), None)
+
+ port = self.make_port(options=MockOptions(webkit_test_runner=True), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac-wk2')
+ self.assertEqual(port.driver_name(), 'WebKitTestRunner')
+ self.assertEqual(port.version_name(), None)
+
def test_factory_with_portname_version(self):
port = self.make_port(options=MockOptions(webkit_test_runner=False), port_name='mac-mountainlion')
self.assertEqual(port.driver_name(), 'DumpRenderTree')
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes