Xcode under Rosetta fails to run unit tests without host application and UI tests

Originator:mail
Number:rdar://FB8990109 Date Originated:2021-02-04
Status:Open Resolved:No
Product:Xcode Product Version:Xcode Version 12.4 (12D4e)
Classification: Reproducible:Yes
 
Xcode fails to run unit tests without host application and UI tests when running with Rosetta enabled

# Please list the steps you took to reproduce the issue:
- Open "Get Info" menu for Xcode.app. Enable "Open using Rosetta"
- Create new Document App iOS project with name "Example"
- Change unit test target settings under General: Host Application = None
- Remove following line from the generated unit test "@testable import Example"
- Run all tests

# What did you expect to happen?
I expected all tests to complete successfully
What actually happened?
I received an error for each test target:

# Error for unit test target:

Details

Invalid device state
Domain: com.apple.CoreSimulator.SimError
Code: 405
--


System Information

macOS Version 11.0.1 (Build 20B29)
Xcode 12.4 (17801) (Build 12D4e)
Timestamp: 2021-02-04T15:56:27+03:00



# Error for ui test target:

Details

Could not attach to pid : “25305”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: attach failed ((os/kern) invalid argument)
User Info: {
    DVTRadarComponentKey = 855031;
    RawLLDBErrorMessage = "attach failed ((os/kern) invalid argument)";
}
--


System Information

macOS Version 11.0.1 (Build 20B29)
Xcode 12.4 (17801) (Build 12D4e)
Timestamp: 2021-02-04T15:56:25+03:00

Comments

This problem appearing only when I start UITests, but UnitTests work fine...

How do you provide access to Example app classes if you: - Remove following line from the generated unit test "@testable import Example"

By subach.pavel at April 12, 2021, 10:52 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!