Title: [262247] branches/safari-610.1.15-branch/Tools
Revision
262247
Author
ryanhad...@apple.com
Date
2020-05-28 10:18:27 -0700 (Thu, 28 May 2020)

Log Message

Cherry-pick r262143. rdar://problem/63517635

    webkitpy: simctl list may have stderr logging
    https://bugs.webkit.org/show_bug.cgi?id=212376
    <rdar://problem/63517635>

    Unreviewed infrastructure fix.

    * Scripts/webkitpy/xcode/simulated_device.py:
    (SimulatedDeviceManager.populate_available_devices): Only parse stdout, log error when
    json decoding fails.
    (SimulatedDevice.is_usable): Only parse stdout.
    (SimulatedDevice.launch_app): Ditto.

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

Modified Paths

Diff

Modified: branches/safari-610.1.15-branch/Tools/ChangeLog (262246 => 262247)


--- branches/safari-610.1.15-branch/Tools/ChangeLog	2020-05-28 17:16:31 UTC (rev 262246)
+++ branches/safari-610.1.15-branch/Tools/ChangeLog	2020-05-28 17:18:27 UTC (rev 262247)
@@ -1,3 +1,37 @@
+2020-05-28  Ryan Haddad  <ryanhad...@apple.com>
+
+        Cherry-pick r262143. rdar://problem/63517635
+
+    webkitpy: simctl list may have stderr logging
+    https://bugs.webkit.org/show_bug.cgi?id=212376
+    <rdar://problem/63517635>
+    
+    Unreviewed infrastructure fix.
+    
+    
+    * Scripts/webkitpy/xcode/simulated_device.py:
+    (SimulatedDeviceManager.populate_available_devices): Only parse stdout, log error when
+    json decoding fails.
+    (SimulatedDevice.is_usable): Only parse stdout.
+    (SimulatedDevice.launch_app): Ditto.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-05-26  Jonathan Bedard  <jbed...@apple.com>
+
+            webkitpy: simctl list may have stderr logging
+            https://bugs.webkit.org/show_bug.cgi?id=212376
+            <rdar://problem/63517635>
+
+            Unreviewed infrastructure fix.
+
+            * Scripts/webkitpy/xcode/simulated_device.py:
+            (SimulatedDeviceManager.populate_available_devices): Only parse stdout, log error when
+            json decoding fails.
+            (SimulatedDevice.is_usable): Only parse stdout.
+            (SimulatedDevice.launch_app): Ditto.
+
 2020-05-22  Alex Christensen  <achristen...@webkit.org>
 
         Make download resume workaround forgiving of changes in CFNetwork

Modified: branches/safari-610.1.15-branch/Tools/Scripts/webkitpy/xcode/simulated_device.py (262246 => 262247)


--- branches/safari-610.1.15-branch/Tools/Scripts/webkitpy/xcode/simulated_device.py	2020-05-28 17:16:31 UTC (rev 262246)
+++ branches/safari-610.1.15-branch/Tools/Scripts/webkitpy/xcode/simulated_device.py	2020-05-28 17:18:27 UTC (rev 262247)
@@ -129,8 +129,9 @@
             return
 
         try:
-            simctl_json = json.loads(host.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'list', '--json'], decode_output=False))
+            simctl_json = json.loads(host.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'list', '--json'], decode_output=False, return_stderr=False))
         except (ValueError, ScriptError):
+            _log.error('Failed to decode json output')
             return
 
         SimulatedDeviceManager._device_identifier_to_name = {device['identifier']: device['name'] for device in simctl_json['devicetypes']}
@@ -569,7 +570,7 @@
             _log.debug(u'{} has no service to check if the device is usable'.format(self.device_type.software_variant))
             return True
 
-        system_processes = self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'spawn', self.udid, 'launchctl', 'print', 'system'], decode_output=True)
+        system_processes = self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'spawn', self.udid, 'launchctl', 'print', 'system'], decode_output=True, return_stderr=False)
         if re.search(r'"{}"'.format(home_screen_service), system_processes) or re.search(r'A\s+{}'.format(home_screen_service), system_processes):
             return True
         return False
@@ -644,6 +645,7 @@
                     ['xcrun', 'simctl', 'launch', self.udid, bundle_id] + args,
                     env=environment_to_use,
                     error_handler=_log_debug_error,
+                    return_stderr=False,
                 )
                 match = re.match(r'(?P<bundle>[^:]+): (?P<pid>\d+)\n', output)
                 # FIXME: We shouldn't need to check the PID <rdar://problem/31154075>.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to