Fix TestAppleSimulatorOSType.py with Xcode 10.2
authorFrederic Riss <friss@apple.com>
Thu, 7 Mar 2019 22:12:03 +0000 (22:12 +0000)
committerFrederic Riss <friss@apple.com>
Thu, 7 Mar 2019 22:12:03 +0000 (22:12 +0000)
It looks like the simctl tool shipped in Xcode10.2 changed the format of
its json output.

llvm-svn: 355644

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

index cf01359..ab01e44 100644 (file)
@@ -29,7 +29,9 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase):
             if not platform in runtime.lower():
                 continue
             for device in devices:
-                if device['availability'] != '(available)':
+                if 'availability' in device and device['availability'] != '(available)':
+                    continue
+                if 'isAvailable' in device and device['isAvailable'] != True:
                     continue
                 deviceUDID = device['udid']
                 break