We're running into an odd issue only when running our test suite on CI (Jenkins) with Xcode 12: xctest reports
xctest encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Volumes/ebs_jenkins/workspace/xcode12-sandbox/derivedData/Logs/Test/Test-Xcode12Sandbox-2020.10.08_02-50-12-+0000.xcresult. (Underlying Error: Invalid device state))
Interestingly, this issue ONLY presents itself when initiated via SSH, when using Screen Sharing (VNC) and running the test suite via Xcode UI, tests pass as expected.
The tests also pass fine on the same CI machine with Xcode 11.5.
You can find a sample project that exhibits the problem here: https://github.com/opfeffer/xcode12-sandbox