Modified: trunk/Tools/ChangeLog (262142 => 262143)
--- trunk/Tools/ChangeLog 2020-05-26 14:46:14 UTC (rev 262142)
+++ trunk/Tools/ChangeLog 2020-05-26 15:42:09 UTC (rev 262143)
@@ -1,3 +1,17 @@
+2020-05-26 Jonathan Bedard <[email protected]>
+
+ 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-25 Wenson Hsieh <[email protected]>
[iOS] ActionSheetTests.DataDetectorsLinkIsNotPresentedAsALink is failing consistently
Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (262142 => 262143)
--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py 2020-05-26 14:46:14 UTC (rev 262142)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py 2020-05-26 15:42:09 UTC (rev 262143)
@@ -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>.