Unit tests only run automatically when active SDK is "simulator"?

Posted by Steve Madsen on Stack Overflow See other posts from Stack Overflow or by Steve Madsen
Published on 2010-03-30T17:34:11Z Indexed on 2010/03/30 20:23 UTC
Read the original article Hit count: 374

Filed under:
|
|

I have followed the instructions Apple publishes for unit testing applications on iPhone and things work great when I set the active SDK to "iPhone Simulator". I have it configured to always build and run my tests as part of building the application itself.

Apple implies (by omission) that this should work all of the time, but the tests are skipped when I set the active SDK to "iPhone Device". I am also linking with OCMock, and instead of a failing test, this warning is in the build log:

ld: warning: in .../build/Debug-iphoneos/OCMock.framework/OCMock, missing required architecture arm in file

It's very nice to make the unit test bundle a dependency of the main application, so these tests run at every build, but its utility is greatly diminished if it doesn't work during device builds. Is this a known, but undocumented, limitation?

© Stack Overflow or respective owner

Related posts about ocunit

Related posts about iphone