This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Skip TestAppleSimulatorOSType if json parsing fails
ClosedPublic

Authored by augusto2112 on Sep 6 2021, 1:07 PM.

Details

Summary

xcodebuild, which is invoked by the apple_simulator_test decorator, may
may return a successful status even if it was unable to run due to the
authorization agent denying it. This causes the TestAppleSimulatorOSType
to run when it shouldn't, and throw an excpection when parsing the JSON
that lists the simulators available. Wrap the json parsing in a
try/except block and if it fails, skip the ttest.

Diff Detail