- a/Tools/ChangeLog +13 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2021-04-30  Commit Queue  <commit-queue@webkit.org>
2
3
        Unreviewed, reverting r276846.
4
        https://bugs.webkit.org/show_bug.cgi?id=225242
5
6
        Breaks test execution in GTK and WPE ports
7
8
        Reverted changeset:
9
10
        "[webkitpy] Support pickling platforminfo"
11
        https://bugs.webkit.org/show_bug.cgi?id=225230
12
        https://trac.webkit.org/changeset/276846
13
1
2021-04-30  Miguel Gomez  <magomez@igalia.com>
14
2021-04-30  Miguel Gomez  <magomez@igalia.com>
2
15
3
        [GTK][WPE] Properly recover from unresponsive web processes
16
        [GTK][WPE] Properly recover from unresponsive web processes
- a/Tools/Scripts/webkitpy/common/system/platforminfo.py -8 / +6 lines
Lines 37-43 from webkitcorepy import Version a/Tools/Scripts/webkitpy/common/system/platforminfo.py_sec1
37
37
38
from webkitpy.common.memoized import memoized
38
from webkitpy.common.memoized import memoized
39
from webkitpy.common.version_name_map import PUBLIC_TABLE, INTERNAL_TABLE, VersionNameMap
39
from webkitpy.common.version_name_map import PUBLIC_TABLE, INTERNAL_TABLE, VersionNameMap
40
from webkitpy.common.system.executive import Executive, ScriptError
40
from webkitpy.common.system.executive import ScriptError
41
from webkitpy.port.config import apple_additions
41
from webkitpy.port.config import apple_additions
42
42
43
43
Lines 59-68 class PlatformInfo(object): a/Tools/Scripts/webkitpy/common/system/platforminfo.py_sec2
59
    newer than one known to the code.
59
    newer than one known to the code.
60
    """
60
    """
61
61
62
    def __init__(self, sys_module=None, platform_module=None, executive=None):
62
    def __init__(self, sys_module, platform_module, executive):
63
        sys_module = sys_module or sys
63
        self._executive = executive
64
65
        self._executive = executive or Executive()
66
        self._platform_module = platform_module
64
        self._platform_module = platform_module
67
        self.os_name = self._determine_os_name(sys_module.platform)
65
        self.os_name = self._determine_os_name(sys_module.platform)
68
        self.os_version = None
66
        self.os_version = None
Lines 136-147 class PlatformInfo(object): a/Tools/Scripts/webkitpy/common/system/platforminfo.py_sec3
136
    def display_name(self):
134
    def display_name(self):
137
        # platform.platform() returns Darwin information for Mac, which is just confusing.
135
        # platform.platform() returns Darwin information for Mac, which is just confusing.
138
        if self.is_mac():
136
        if self.is_mac():
139
            return "Mac OS X %s" % (self._platform_module or platform).mac_ver()[0]
137
            return "Mac OS X %s" % self._platform_module.mac_ver()[0]
140
138
141
        # Returns strings like:
139
        # Returns strings like:
142
        # Linux-2.6.18-194.3.1.el5-i686-with-redhat-5.5-Final
140
        # Linux-2.6.18-194.3.1.el5-i686-with-redhat-5.5-Final
143
        # Windows-2008ServerR2-6.1.7600
141
        # Windows-2008ServerR2-6.1.7600
144
        return (self._platform_module or platform).platform()
142
        return self._platform_module.platform()
145
143
146
    def os_version_name(self, table=None):
144
    def os_version_name(self, table=None):
147
        if not self.os_version:
145
        if not self.os_version:
Lines 248-254 class PlatformInfo(object): a/Tools/Scripts/webkitpy/common/system/platforminfo.py_sec4
248
        return Version.from_iterable(match_object.groups())
246
        return Version.from_iterable(match_object.groups())
249
247
250
    def _win_version_str(self):
248
    def _win_version_str(self):
251
        version = (self._platform_module or platform).win32_ver()[1]
249
        version = self._platform_module.win32_ver()[1]
252
        if version:
250
        if version:
253
            return version
251
            return version
254
        # Note that this should only ever be called on windows, so this should always work.
252
        # Note that this should only ever be called on windows, so this should always work.
- a/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py -1 / +1 lines
Lines 75-81 class TestPlatformInfo(unittest.TestCase): a/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py_sec1
75
    # yet run by default and there's no reason not to run this everywhere by default.
75
    # yet run by default and there's no reason not to run this everywhere by default.
76
    def test_real_code(self):
76
    def test_real_code(self):
77
        # This test makes sure the real (unmocked) code actually works.
77
        # This test makes sure the real (unmocked) code actually works.
78
        info = PlatformInfo(executive=Executive())
78
        info = PlatformInfo(sys, platform, Executive())
79
        self.assertNotEqual(info.os_name, '')
79
        self.assertNotEqual(info.os_name, '')
80
        if info.is_mac() or info.is_win():
80
        if info.is_mac() or info.is_win():
81
            self.assertIsNotNone(info.os_version)
81
            self.assertIsNotNone(info.os_version)
- a/Tools/Scripts/webkitpy/common/system/systemhost.py -1 / +1 lines
Lines 38-44 class SystemHost(object): a/Tools/Scripts/webkitpy/common/system/systemhost.py_sec1
38
    def __init__(self):
38
    def __init__(self):
39
        self.executive = executive.Executive()
39
        self.executive = executive.Executive()
40
        self.filesystem = filesystem.FileSystem()
40
        self.filesystem = filesystem.FileSystem()
41
        self.platform = platforminfo.PlatformInfo(executive=self.executive)
41
        self.platform = platforminfo.PlatformInfo(sys, platform, self.executive)
42
        self.user = user.User(self.platform)
42
        self.user = user.User(self.platform)
43
        self.workspace = workspace.Workspace(self.filesystem, self.executive)
43
        self.workspace = workspace.Workspace(self.filesystem, self.executive)
44
44

Return to Bug 225242