Prevent OCUnit tests from running when compilation fails

Posted by mhenry1384 on Stack Overflow See other posts from Stack Overflow or by mhenry1384
Published on 2010-06-07T18:59:05Z Indexed on 2010/06/07 19:02 UTC
Read the original article Hit count: 277

Filed under:
|

I'm using Xcode 3.2.2 and the built in OCUnit test stuff. One problem I'm running into is that every time I do a build my unit tests are run, even if the build failed. Let's say I make a syntax error in one of my tests. The test fails to compile and the last successful compilation of the unit tests are run. The same thing happens if one of the dependent targets fail to build - the tests are still run. Which is obviously not what I want.

How can I prevent the tests from running if the build fails? If this is not possible then I'd rather have the tests never run automatically, is that possible? Sorry if this is obvious, I'm an Xcode noob. Should I be using a better unit testing framework?

© Stack Overflow or respective owner

Related posts about xcode

Related posts about ocunit