Fix TestAppleSimulatorOSType.py with Xcode 10.2

It looks like the simctl tool shipped in Xcode10.2 changed the format of
its json output.

llvm-svn: 355644
This commit is contained in:
Frederic Riss 2019-03-07 22:12:03 +00:00
parent 16d9a3a4b6
commit c525b36b43

View 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