Changeset 102161 in webkit


Ignore:
Timestamp:
Dec 6, 2011 12:00:03 PM (12 years ago)
Author:
abarth@webkit.org
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.
Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r102150 r102161  
     12011-12-06  Adam Barth  <abarth@webkit.org>
     2
     3        NRWT fails on unreleased versions of Mac OS X
     4        https://bugs.webkit.org/show_bug.cgi?id=72748
     5
     6        Reviewed by Dirk Pranke.
     7
     8        Hopefully this patch will make NRWT work on future versions on Mac OS X.
     9        Most of the infrastructure was already in place, but there were some
     10        asserts that failed.  I've tested this patch by haxoring the version
     11        detection logic to simulate an unknown version.  We might need to
     12        iterate based on feedback from folks with a real future version.
     13
     14        * Scripts/webkitpy/layout_tests/port/apple.py:
     15        (ApplePort.__init__):
     16            - mac-future is an allowed port_name that's used internally by
     17              webkitpy to represent future versions of Mac OS X.
     18        * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
     19        (test_versions):
     20            - Test that we don't throw exceptions when dealing with future
     21              versions of Mac OS X.
     22        * Scripts/webkitpy/layout_tests/port/webkit.py:
     23        (WebKitPort._expectations_from_skipped_files):
     24            - Demote this logging message to "debug".  It's expected that
     25              mac-future doesn't have a Skipped file.
     26        * Scripts/webkitpy/layout_tests/port/mac.py:
     27        (MacPort.__init__):
     28        * Scripts/webkitpy/layout_tests/port/win.py:
     29        (WinPort.__init__):
     30            - Re-order some code in these constructors so that
     31              self._operating_system is available to the ApplePort constructor.
     32
    1332011-12-06  Tommy Widenflycht  <tommyw@google.com>
    234
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py

    r99773 r102161  
    7171            self._name = self.port_name + '-' + self._version
    7272        else:
    73             assert port_name in self.VERSION_FALLBACK_ORDER, "%s is not in %s" % (port_name, self.VERSION_FALLBACK_ORDER)
     73            allowed_port_names = self.VERSION_FALLBACK_ORDER + [self._operating_system + "-future"]
     74            assert port_name in allowed_port_names, "%s is not in %s" % (port_name, allowed_port_names)
    7475            self._version = self._strip_port_name_prefix(port_name)
    7576
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py

    r100674 r102161  
    7676
    7777    def __init__(self, host, **kwargs):
     78        self._operating_system = 'mac'
    7879        ApplePort.__init__(self, host, **kwargs)
    79         self._operating_system = 'mac'
    8080        self._leak_detector = LeakDetector(self)
    8181        if self.get_option("leaks"):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py

    r100618 r102161  
    109109        self.assert_name(None, '10.7', 'mac-lion')
    110110        self.assert_name(None, '10.7.3', 'mac-lion')
    111         self.assert_name(None, '10.8', 'mac-future')
    112111        self.assert_name('mac', '10.7.3', 'mac-lion')
     112
     113        self.assert_name(None, '10.9', 'mac-future')
     114        self.assert_name('mac', '10.9', 'mac-future')
     115        self.assert_name('mac-future', '10.9', 'mac-future')
    113116
    114117        self.assertRaises(AssertionError, self.assert_name, None, '10.3.1', 'should-raise-assertion-so-this-value-does-not-matter')
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py

    r101979 r102161  
    340340        # Unlike baseline_search_path, we only want to search [WK2-PORT, PORT-VERSION, PORT] not the full casade.
    341341        # Note order doesn't matter since the Skipped file contents are all combined.
     342        #
     343        # FIXME: It's not correct to assume that port names map directly to
     344        # directory names. For example, mac-future is a port name that does
     345        # not have a cooresponding directory. The WebKit2 ports are another
     346        # example.
    342347        search_paths = set([self.port_name, self.name()])
    343348        if self.get_option('webkit_test_runner'):
     
    352357            filename = self._filesystem.join(self._webkit_baseline_path(search_path), "Skipped")
    353358            if not self._filesystem.exists(filename):
    354                 _log.warn("Failed to open Skipped file: %s" % filename)
     359                _log.debug("Skipped does not exist: %s" % filename)
    355360                continue
    356361            _log.debug("Using Skipped file: %s" % filename)
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py

    r100674 r102161  
    7676
    7777    def __init__(self, host, **kwargs):
     78        self._operating_system = 'win'
    7879        ApplePort.__init__(self, host, **kwargs)
    79         self._operating_system = 'win'
    8080
    8181    def compare_text(self, expected_text, actual_text):
Note: See TracChangeset for help on using the changeset viewer.