Xcode 5 unable to run inline unit tests for OSX when static library unit tests are shared between OSX and IOS unit test targets.
| Originator: | berbie | ||
| Number: | rdar://15967763 | Date Originated: | 2014-02-03 |
| Status: | open | Resolved: | |
| Product: | XCode | Product Version: | 5.0.2 (5A3005) |
| Classification: | Bug | Reproducible: | Always |
Xcode 5 unable to run inline unit tests for OSX when static library unit tests are shared between OSX and IOS unit test targets. Summary I want to create a static library that is cross platform for OSX and IOS. Therefore the OSX and IOS static library projects are located in a joint workspace. The particular issue to be brought to attention is with the shared unit tests. The shared unit test file is being added to both projects and added to both unit test targets. Running all unit tests on the respective plattform works fine. Running an inline unit test for the OSX plattform shows the following error message: “The run destination My Mac 64–bit is not valid for tests you have chosen to perform.” Steps to Reproduce Look at the provided sample project MultiPlattformLib For each of the two schemes running all unit tests using cmd-U works (tests fail as expected) select the CrossLibIOS Scheme Select Project Navigator > CrossLibIOS > CrossLibIOSTests > CrossLibSharedTests.m click on the run inline test button for testExample. notice that the inline test runs as expected select the CrossLibOSX Scheme Select Project Navigator > CrossLibOSX > CrossLibOSXTests > CrossLibSharedTests.m click on the run inline test button for testExample. notice that the inline test does not start to run but the following error message sheet drops down: “The run destination My Mac 64–bit is not valid for tests you have chosen to perform.” run al unit tests for the scheme notice that all tests run as expected again click on the run inline test button for testExample. notice that the inline test does not start with the same error message as above. Expected Results The inline test should be executed based on the currently selected scheme. Actual Results For the OSX target you get the message “The run destination My Mac 64-bit is not valid for tests you have chosen to perform. Please select a run destination which supports the tests that you wish to perform”.
Comments
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!