Log Message
nrwt: run with no args on lion, is putting baselines in platform/mac-lion, not platform/mac https://bugs.webkit.org/show_bug.cgi?id=81028
Reviewed by Ojan Vafai. The mac port had incorrect lookups for 'mac-lion' and 'mac-future' in some places. This patch fixes that and adds a bunch of tests. * Scripts/webkitpy/layout_tests/port/mac.py: (MacPort.baseline_path): * Scripts/webkitpy/layout_tests/port/mac_unittest.py: (MacTest.assert_skipped_file_search_paths): (MacTest.test_skipped_file_search_paths): (_assert_search_path): (test_baseline_search_path): * Scripts/webkitpy/layout_tests/port/webkit.py: (WebKitPort._skipped_file_search_paths):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (110721 => 110722)
--- trunk/Tools/ChangeLog 2012-03-14 18:45:37 UTC (rev 110721)
+++ trunk/Tools/ChangeLog 2012-03-14 18:53:34 UTC (rev 110722)
@@ -1,3 +1,24 @@
+2012-03-14 Dirk Pranke <[email protected]>
+
+ nrwt: run with no args on lion, is putting baselines in platform/mac-lion, not platform/mac
+ https://bugs.webkit.org/show_bug.cgi?id=81028
+
+ Reviewed by Ojan Vafai.
+
+ The mac port had incorrect lookups for 'mac-lion' and
+ 'mac-future' in some places. This patch fixes that and adds a
+ bunch of tests.
+
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.baseline_path):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (MacTest.assert_skipped_file_search_paths):
+ (MacTest.test_skipped_file_search_paths):
+ (_assert_search_path):
+ (test_baseline_search_path):
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ (WebKitPort._skipped_file_search_paths):
+
2012-03-13 Jer Noble <[email protected]>
Lion Intel Debug WebKit2 Tests crashing under [WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py (110721 => 110722)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2012-03-14 18:45:37 UTC (rev 110721)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2012-03-14 18:53:34 UTC (rev 110722)
@@ -50,6 +50,18 @@
# with MallocStackLogging enabled.
self.set_option_default("batch_size", 1000)
+ def _most_recent_version(self):
+ # This represents the most recently-shipping version of the operating system.
+ return self.VERSION_FALLBACK_ORDER[-2]
+
+ def baseline_path(self):
+ if self.name() == self._most_recent_version():
+ # Baselines for the most recently shiping version should go into 'mac', not 'mac-foo'.
+ if self.get_option('webkit_test_runner'):
+ return self._webkit_baseline_path('mac-wk2')
+ return self._webkit_baseline_path('mac')
+ return ApplePort.baseline_path(self)
+
def baseline_search_path(self):
fallback_index = self.VERSION_FALLBACK_ORDER.index(self._port_name_with_version())
fallback_names = list(self.VERSION_FALLBACK_ORDER[fallback_index:])
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py (110721 => 110722)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py 2012-03-14 18:45:37 UTC (rev 110721)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py 2012-03-14 18:53:34 UTC (rev 110722)
@@ -41,17 +41,25 @@
port_name = 'mac-leopard'
port_maker = MacPort
- def assert_skipped_file_search_paths(self, port_name, expected_paths):
- port = self.make_port(port_name=port_name)
+ def assert_skipped_file_search_paths(self, port_name, expected_paths, use_webkit2=False):
+ port = self.make_port(port_name=port_name, options=MockOptions(webkit_test_runner=use_webkit2))
self.assertEqual(port._skipped_file_search_paths(), expected_paths)
def test_skipped_file_search_paths(self):
self.assert_skipped_file_search_paths('mac-snowleopard', set(['mac-snowleopard', 'mac']))
self.assert_skipped_file_search_paths('mac-leopard', set(['mac-leopard', 'mac']))
- # We cannot test just "mac" here as the MacPort constructor automatically fills in the version from the running OS.
- # self.assert_skipped_file_search_paths('mac', ['mac'])
+ self.assert_skipped_file_search_paths('mac-lion', set(['mac-lion', 'mac']))
+ # Note that there is no platform/mac-future/Skipped.
+ self.assert_skipped_file_search_paths('mac-future', set(['mac']))
+ self.assert_skipped_file_search_paths('mac-snowleopard', set(['mac-snowleopard', 'mac', 'mac-wk2', 'wk2']), use_webkit2=True)
+ self.assert_skipped_file_search_paths('mac-leopard', set(['mac-leopard', 'mac', 'mac-wk2', 'wk2']), use_webkit2=True)
+ self.assert_skipped_file_search_paths('mac-lion', set(['mac-lion', 'mac', 'mac-wk2', 'wk2']), use_webkit2=True)
+ self.assert_skipped_file_search_paths('mac-future', set(['mac', 'mac-wk2', 'wk2']), use_webkit2=True)
+
+
+
example_skipped_file = u"""
# <rdar://problem/5647952> fast/events/mouseout-on-window.html needs mac DRT to issue mouse out events
fast/events/mouseout-on-window.html
@@ -139,24 +147,27 @@
self.assertEquals(env['MallocStackLogging'], '1')
self.assertEquals(env['DYLD_INSERT_LIBRARIES'], '/usr/lib/libgmalloc.dylib')
- def _assert_search_path(self, search_paths, version, use_webkit2=False):
- # FIXME: Port constructors should not "parse" the port name, but
- # rather be passed components (directly or via setters). Once
- # we fix that, this method will need a re-write.
- port = self.make_port(port_name='mac-%s' % version, options=MockOptions(webkit_test_runner=use_webkit2))
+ def _assert_search_path(self, port_name, baseline_path, search_paths, use_webkit2=False):
+ port = self.make_port(port_name=port_name, options=MockOptions(webkit_test_runner=use_webkit2))
absolute_search_paths = map(port._webkit_baseline_path, search_paths)
+ self.assertEquals(port.baseline_path(), port._webkit_baseline_path(baseline_path))
self.assertEquals(port.baseline_search_path(), absolute_search_paths)
def test_baseline_search_path(self):
- # FIXME: Is this really right? Should mac-leopard fallback to mac-snowleopard?
- self._assert_search_path(['mac-leopard', 'mac-snowleopard', 'mac-lion', 'mac'], 'leopard')
- self._assert_search_path(['mac-snowleopard', 'mac-lion', 'mac'], 'snowleopard')
- self._assert_search_path(['mac-lion', 'mac'], 'lion')
+ self._assert_search_path('mac-leopard', 'mac-leopard', ['mac-leopard', 'mac-snowleopard', 'mac-lion', 'mac'])
+ self._assert_search_path('mac-snowleopard', 'mac-snowleopard', ['mac-snowleopard', 'mac-lion', 'mac'])
- self._assert_search_path(['mac-wk2', 'mac-leopard', 'mac-snowleopard', 'mac-lion', 'mac'], 'leopard', use_webkit2=True)
- self._assert_search_path(['mac-wk2', 'mac-snowleopard', 'mac-lion', 'mac'], 'snowleopard', use_webkit2=True)
- self._assert_search_path(['mac-wk2', 'mac-lion', 'mac'], 'lion', use_webkit2=True)
+ # Note that mac-lion writes baselines into mac, not mac-lion! (but it will read from mac-lion)
+ self._assert_search_path('mac-lion', 'mac', ['mac-lion', 'mac'])
+ # Note that there is no 'mac-future'; it uses the 'mac' directory as well.
+ self._assert_search_path('mac-future', 'mac', ['mac'])
+
+ self._assert_search_path('mac-leopard', 'mac-wk2', ['mac-wk2', 'mac-leopard', 'mac-snowleopard', 'mac-lion', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-snowleopard', 'mac-wk2', ['mac-wk2', 'mac-snowleopard', 'mac-lion', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-lion', 'mac-wk2', ['mac-wk2', 'mac-lion', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-future', 'mac-wk2', ['mac-wk2', 'mac'], use_webkit2=True)
+
def test_show_results_html_file(self):
port = self.make_port()
# Delay setting a should_log executive to avoid logging from MacPort.__init__.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py (110721 => 110722)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2012-03-14 18:45:37 UTC (rev 110721)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2012-03-14 18:53:34 UTC (rev 110722)
@@ -335,12 +335,9 @@
def _skipped_file_search_paths(self):
# Unlike baseline_search_path, we only want to search [WK2-PORT, PORT-VERSION, PORT] not the full casade.
# Note order doesn't matter since the Skipped file contents are all combined.
- #
- # FIXME: It's not correct to assume that port names map directly to
- # directory names. For example, mac-future is a port name that does
- # not have a cooresponding directory. The WebKit2 ports are another
- # example.
- search_paths = set([self.port_name, self.name()])
+ search_paths = set([self.port_name])
+ if 'future' not in self.name():
+ search_paths.add(self.name())
if self.get_option('webkit_test_runner'):
# Because nearly all of the skipped tests for WebKit 2 are due to cross-platform
# issues, all wk2 ports share a skipped list under platform/wk2.
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
