- Revision
- 102161
- Author
- aba...@webkit.org
- Date
- 2011-12-06 12:00:03 -0800 (Tue, 06 Dec 2011)
Log Message
NRWT fails on unreleased versions of Mac OS X
https://bugs.webkit.org/show_bug.cgi?id=72748
Reviewed by Dirk Pranke.
Hopefully this patch will make NRWT work on future versions on Mac OS X.
Most of the infrastructure was already in place, but there were some
asserts that failed. I've tested this patch by haxoring the version
detection logic to simulate an unknown version. We might need to
iterate based on feedback from folks with a real future version.
* Scripts/webkitpy/layout_tests/port/apple.py:
(ApplePort.__init__):
- mac-future is an allowed port_name that's used internally by
webkitpy to represent future versions of Mac OS X.
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(test_versions):
- Test that we don't throw exceptions when dealing with future
versions of Mac OS X.
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._expectations_from_skipped_files):
- Demote this logging message to "debug". It's expected that
mac-future doesn't have a Skipped file.
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.__init__):
* Scripts/webkitpy/layout_tests/port/win.py:
(WinPort.__init__):
- Re-order some code in these constructors so that
self._operating_system is available to the ApplePort constructor.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (102160 => 102161)
--- trunk/Tools/ChangeLog 2011-12-06 19:58:41 UTC (rev 102160)
+++ trunk/Tools/ChangeLog 2011-12-06 20:00:03 UTC (rev 102161)
@@ -1,3 +1,35 @@
+2011-12-06 Adam Barth <aba...@webkit.org>
+
+ NRWT fails on unreleased versions of Mac OS X
+ https://bugs.webkit.org/show_bug.cgi?id=72748
+
+ Reviewed by Dirk Pranke.
+
+ Hopefully this patch will make NRWT work on future versions on Mac OS X.
+ Most of the infrastructure was already in place, but there were some
+ asserts that failed. I've tested this patch by haxoring the version
+ detection logic to simulate an unknown version. We might need to
+ iterate based on feedback from folks with a real future version.
+
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort.__init__):
+ - mac-future is an allowed port_name that's used internally by
+ webkitpy to represent future versions of Mac OS X.
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (test_versions):
+ - Test that we don't throw exceptions when dealing with future
+ versions of Mac OS X.
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ (WebKitPort._expectations_from_skipped_files):
+ - Demote this logging message to "debug". It's expected that
+ mac-future doesn't have a Skipped file.
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.__init__):
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort.__init__):
+ - Re-order some code in these constructors so that
+ self._operating_system is available to the ApplePort constructor.
+
2011-12-06 Tommy Widenflycht <tom...@google.com>
Added myself as a committer.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py (102160 => 102161)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2011-12-06 19:58:41 UTC (rev 102160)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2011-12-06 20:00:03 UTC (rev 102161)
@@ -70,7 +70,8 @@
self._version = self._detect_version(os_version_string) or self.FUTURE_VERSION
self._name = self.port_name + '-' + self._version
else:
- assert port_name in self.VERSION_FALLBACK_ORDER, "%s is not in %s" % (port_name, self.VERSION_FALLBACK_ORDER)
+ allowed_port_names = self.VERSION_FALLBACK_ORDER + [self._operating_system + "-future"]
+ assert port_name in allowed_port_names, "%s is not in %s" % (port_name, allowed_port_names)
self._version = self._strip_port_name_prefix(port_name)
# FIXME: A more sophisitcated version of this function should move to WebKitPort and replace all calls to name().
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py (102160 => 102161)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2011-12-06 19:58:41 UTC (rev 102160)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2011-12-06 20:00:03 UTC (rev 102161)
@@ -75,8 +75,8 @@
return os_version(os_version_string)
def __init__(self, host, **kwargs):
+ self._operating_system = 'mac'
ApplePort.__init__(self, host, **kwargs)
- self._operating_system = 'mac'
self._leak_detector = LeakDetector(self)
if self.get_option("leaks"):
# DumpRenderTree slows down noticably if we run more than about 1000 tests in a batch
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py (102160 => 102161)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py 2011-12-06 19:58:41 UTC (rev 102160)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py 2011-12-06 20:00:03 UTC (rev 102161)
@@ -108,9 +108,12 @@
self.assert_name(None, '10.7', 'mac-lion')
self.assert_name(None, '10.7.3', 'mac-lion')
- self.assert_name(None, '10.8', 'mac-future')
self.assert_name('mac', '10.7.3', 'mac-lion')
+ self.assert_name(None, '10.9', 'mac-future')
+ self.assert_name('mac', '10.9', 'mac-future')
+ self.assert_name('mac-future', '10.9', 'mac-future')
+
self.assertRaises(AssertionError, self.assert_name, None, '10.3.1', 'should-raise-assertion-so-this-value-does-not-matter')
def test_is_version_methods(self):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py (102160 => 102161)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2011-12-06 19:58:41 UTC (rev 102160)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2011-12-06 20:00:03 UTC (rev 102161)
@@ -339,6 +339,11 @@
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()])
if self.get_option('webkit_test_runner'):
# Because nearly all of the skipped tests for WebKit 2 are due to cross-platform
@@ -351,7 +356,7 @@
for search_path in self._skipped_file_search_paths():
filename = self._filesystem.join(self._webkit_baseline_path(search_path), "Skipped")
if not self._filesystem.exists(filename):
- _log.warn("Failed to open Skipped file: %s" % filename)
+ _log.debug("Skipped does not exist: %s" % filename)
continue
_log.debug("Using Skipped file: %s" % filename)
skipped_file_contents = self._filesystem.read_text_file(filename)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py (102160 => 102161)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2011-12-06 19:58:41 UTC (rev 102160)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2011-12-06 20:00:03 UTC (rev 102161)
@@ -75,8 +75,8 @@
return self._version_string_from_windows_version_tuple(version_tuple)
def __init__(self, host, **kwargs):
+ self._operating_system = 'win'
ApplePort.__init__(self, host, **kwargs)
- self._operating_system = 'win'
def compare_text(self, expected_text, actual_text):
# Sanity was restored in WK2, so we don't need this hack there.