⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267508 in webkit


Ignore:
Timestamp:
Sep 23, 2020, 4:28:50 PM (6 years ago)
Author:
Jonathan Bedard
Message:

webkitpy: Make sw_vers the source of truth for the MacOS version
https://bugs.webkit.org/show_bug.cgi?id=216903
<rdar://problem/69462735>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/common/system/platforminfo.py:

(PlatformInfo.init): Use sw_vers instead of platform.mac_ver().

  • Scripts/webkitpy/common/system/platforminfo_unittest.py:

(fake_executive): Set a valid return value for sw_vers by default.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r267502 r267508  
     12020-09-23  Jonathan Bedard  <jbedard@apple.com>
     2
     3        webkitpy: Make sw_vers the source of truth for the MacOS version
     4        https://bugs.webkit.org/show_bug.cgi?id=216903
     5        <rdar://problem/69462735>
     6
     7        Reviewed by Dewei Zhu.
     8
     9        * Scripts/webkitpy/common/system/platforminfo.py:
     10        (PlatformInfo.__init__): Use sw_vers instead of platform.mac_ver().
     11        * Scripts/webkitpy/common/system/platforminfo_unittest.py:
     12        (fake_executive): Set a valid return value for sw_vers by default.
     13
    1142020-09-23  Carlos Garcia Campos  <cgarcia@igalia.com>
    215
  • trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py

    r264425 r267508  
    6868
    6969        if self.os_name.startswith('mac'):
    70             self.os_version = Version.from_string(platform_module.mac_ver()[0])
     70            self.os_version = Version.from_string(self._executive.run_command(['sw_vers', '-productVersion']).rstrip())
    7171        elif self.os_name.startswith('win'):
    7272            self.os_version = self._win_version()
  • trunk/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py

    r261722 r267508  
    6565    if output:
    6666        return MockExecutive2(output=output)
    67     return MockExecutive2(exception=SystemError)
     67    return MockExecutive2(output='10.15.0\n')
    6868
    6969
Note: See TracChangeset for help on using the changeset viewer.