[Lldb-commits] [lldb] r347117 - Make TestAppleSimulatorOSType.py more flexible

Frederic Riss via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 16 16:40:31 PST 2018


Author: friss
Date: Fri Nov 16 16:40:31 2018
New Revision: 347117

URL: http://llvm.org/viewvc/llvm-project?rev=347117&view=rev
Log:
Make TestAppleSimulatorOSType.py more flexible

Different versions of Xcode have different outputs for the simctl command

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py?rev=347117&r1=347116&r2=347117&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py Fri Nov 16 16:40:31 2018
@@ -19,7 +19,13 @@ class TestAppleSimulatorOSType(gdbremote
         sim_devices = json.loads(sim_devices_str)['devices']
         # Find an available simulator for the requested platform
         deviceUDID = None
-        for (runtime,devices) in sim_devices.items():
+        for simulator in sim_devices:
+            if isinstance(simulator,dict):
+                runtime = simulator['name']
+                devices = simulator['devices']
+            else:
+                runtime = simulator
+                devices = sim_devices[simulator]
             if not platform in runtime.lower():
                 continue
             for device in devices:




More information about the lldb-commits mailing list