Title: [217793] trunk/Tools
Revision
217793
Author
[email protected]
Date
2017-06-05 14:00:51 -0700 (Mon, 05 Jun 2017)

Log Message

webkitpy: Add iOS to platform
https://bugs.webkit.org/show_bug.cgi?id=172931

Reviewed by Daniel Bates.

* Scripts/webkitpy/common/system/platforminfo.py:
PlatformInfo.__init__): Use platform_module.release() as the os_version for iOS device.
(PlatformInfo.is_ios): Added.
(PlatformInfo._determine_os_name): A platform name of 'ios' means that the os name is 'ios'.
* Scripts/webkitpy/common/system/platforminfo_mock.py:
(MockPlatformInfo.is_ios): Added.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (217792 => 217793)


--- trunk/Tools/ChangeLog	2017-06-05 20:54:08 UTC (rev 217792)
+++ trunk/Tools/ChangeLog	2017-06-05 21:00:51 UTC (rev 217793)
@@ -1,3 +1,17 @@
+2017-06-05  Jonathan Bedard  <[email protected]>
+
+        webkitpy: Add iOS to platform
+        https://bugs.webkit.org/show_bug.cgi?id=172931
+
+        Reviewed by Daniel Bates.
+
+        * Scripts/webkitpy/common/system/platforminfo.py:
+        PlatformInfo.__init__): Use platform_module.release() as the os_version for iOS device.
+        (PlatformInfo.is_ios): Added.
+        (PlatformInfo._determine_os_name): A platform name of 'ios' means that the os name is 'ios'.
+        * Scripts/webkitpy/common/system/platforminfo_mock.py:
+        (MockPlatformInfo.is_ios): Added.
+
 2017-06-05  Carlos Alberto Lopez Perez  <[email protected]>
 
         [WPE][JHBuild] Switch github repository from git:// to https://

Modified: trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py (217792 => 217793)


--- trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py	2017-06-05 20:54:08 UTC (rev 217792)
+++ trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py	2017-06-05 21:00:51 UTC (rev 217793)
@@ -52,7 +52,7 @@
         self.os_name = self._determine_os_name(sys_module.platform)
         if self.os_name == 'linux':
             self.os_version = self._determine_linux_version()
-        if self.os_name == 'freebsd' or self.os_name == 'openbsd' or self.os_name == 'netbsd':
+        if self.os_name == 'freebsd' or self.os_name == 'openbsd' or self.os_name == 'netbsd' or self.os_name == 'ios':
             self.os_version = platform_module.release()
         if self.os_name.startswith('mac'):
             self.os_version = self._determine_mac_version(platform_module.mac_ver()[0])
@@ -63,6 +63,9 @@
     def is_mac(self):
         return self.os_name == 'mac'
 
+    def is_ios(self):
+        return self.os_name == 'ios'
+
     def is_win(self):
         return self.os_name == 'win'
 
@@ -141,6 +144,8 @@
     def _determine_os_name(self, sys_platform):
         if sys_platform == 'darwin':
             return 'mac'
+        if sys_platform == 'ios':
+            return 'ios'
         if sys_platform.startswith('linux'):
             return 'linux'
         if sys_platform.startswith('win') or sys_platform == 'cygwin':

Modified: trunk/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py (217792 => 217793)


--- trunk/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py	2017-06-05 20:54:08 UTC (rev 217792)
+++ trunk/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py	2017-06-05 21:00:51 UTC (rev 217793)
@@ -36,6 +36,9 @@
     def is_mac(self):
         return self.os_name == 'mac'
 
+    def is_ios(self):
+        return self.os_name == 'ios'
+
     def is_linux(self):
         return self.os_name == 'linux'
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to