From f7c101b653ebc0752c805edb437fb57323483830 Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Sat, 17 Nov 2018 00:40:31 +0000 Subject: [PATCH] Make TestAppleSimulatorOSType.py more flexible Different versions of Xcode have different outputs for the simctl command llvm-svn: 347117 --- .../test/tools/lldb-server/TestAppleSimulatorOSType.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py index 54836b21f811..62c948c36cf7 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py @@ -19,7 +19,13 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): 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: