Title: [239878] trunk/Tools
Revision
239878
Author
[email protected]
Date
2019-01-11 14:48:15 -0800 (Fri, 11 Jan 2019)

Log Message

webkitpy: Support alternate simctl device list output
https://bugs.webkit.org/show_bug.cgi?id=193362
<rdar://problem/47122965>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.populate_available_devices):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (239877 => 239878)


--- trunk/Tools/ChangeLog	2019-01-11 22:38:24 UTC (rev 239877)
+++ trunk/Tools/ChangeLog	2019-01-11 22:48:15 UTC (rev 239878)
@@ -1,3 +1,14 @@
+2019-01-11  Jonathan Bedard  <[email protected]>
+
+        webkitpy: Support alternate simctl device list output
+        https://bugs.webkit.org/show_bug.cgi?id=193362
+        <rdar://problem/47122965>
+
+        Reviewed by Lucas Forschler.
+
+        * Scripts/webkitpy/xcode/simulated_device.py:
+        (SimulatedDeviceManager.populate_available_devices):
+
 2019-01-11  Aakash Jain  <[email protected]>
 
         [ews-build] Update macOS queue configurations

Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (239877 => 239878)


--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2019-01-11 22:38:24 UTC (rev 239877)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2019-01-11 22:48:15 UTC (rev 239878)
@@ -131,7 +131,17 @@
         SimulatedDeviceManager.AVAILABLE_RUNTIMES = SimulatedDeviceManager._create_runtimes(simctl_json['runtimes'])
 
         for runtime in SimulatedDeviceManager.AVAILABLE_RUNTIMES:
-            for device_json in simctl_json['devices'][runtime.name]:
+            # Needed for <rdar://problem/47122965>
+            devices = []
+            if isinstance(simctl_json['devices'], list):
+                for devices_for_runtime in simctl_json['devices']:
+                    if devices_for_runtime['name'] == runtime.name:
+                        devices = devices_for_runtime['devices']
+                        break
+            else:
+                devices = simctl_json['devices'][runtime.name]
+
+            for device_json in devices:
                 device = SimulatedDeviceManager._create_device_with_runtime(host, runtime, device_json)
                 if not device:
                     continue
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to