webkitpy: xcrun simctl spawn *** launchctl print system output is not utf-8
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jun 2019 18:01:05 +0000 (18:01 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jun 2019 18:01:05 +0000 (18:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198723

Reviewed by Aakash Jain.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.is_usable): Do not decode 'print system' output, it's already ASCII.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/xcode/simulated_device.py

index 5800c07..b60322f 100644 (file)
@@ -1,3 +1,13 @@
+2019-06-10  Jonathan Bedard  <jbedard@apple.com>
+
+        webkitpy: xcrun simctl spawn *** launchctl print system output is not utf-8
+        https://bugs.webkit.org/show_bug.cgi?id=198723
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/webkitpy/xcode/simulated_device.py:
+        (SimulatedDevice.is_usable): Do not decode 'print system' output, it's already ASCII.
+
 2019-06-10  Sihui Liu  <sihui_liu@apple.com>
 
         [WKHTTPCookieStore getAllCookies:] may return duplicate cookies
index 5d4bab3..33de2ae 100644 (file)
@@ -534,7 +534,7 @@ class SimulatedDevice(object):
             _log.debug('{} has no service to check if the device is usable'.format(self.device_type.software_variant))
             return True
 
-        for line in self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'spawn', self.udid, 'launchctl', 'print', 'system']).splitlines():
+        for line in self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'spawn', self.udid, 'launchctl', 'print', 'system'], decode_output=False).splitlines():
             if home_screen_service in line:
                 return True
         return False