Running iOS Unit Tests from Command Line with Xcod

2019-04-04 08:13发布

问题:

While running Unit Tests from command line (necessary for Jenkins) used to work until Xcode 4.4.1 with this hack, it does not seem to work anymore with Xcode 4.5.

Now I get the following error message:

....MyTests.build/Script-641C6E0115D3BECD004175F...: line 3: 16669 Segmentation fault: 11  "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"

Any ideas how to make it work again?

回答1:

I had the same issue after updating. You have to pass the argument RUN_UNIT_TEST_WITH_IOS_SIM=YES to the command xcodebuild to make it work.