Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 7, 2010, 09:44 PM   #1
isthisonetaken
macrumors regular
 
Join Date: Jun 2006
OCUnit Testing Problems in Xcode 3.2.4

Hey guys,

so I'm trying to get OCUnit testing working in Xcode 3.2.4, but I keep running into problems. I found this article: https://developer.apple.com/library/...TestingXcode3/ (probably need to sign in to read it) as well as this one: http://sqllyw.wordpress.com/2009/11/...-in-xcode-3-2/

Both times, I get to the part where it says to build the unit tests to see the errors and I get different results. I wind up getting 2 errors, instead of the 1 we want to get. The first error is: Command /bin/sh failed with exit code 1. I've done some googling, and it seems others have had this problem, although on older versions of Xcode.

I'm wondering if anyone has had this problem before and knows how to fix it, or has some suggestions on how to fix it?

I should add as well:
The app is added under the Unit Test target's direct dependencies.
I have set the Configuration to Debug and All Configurations under the Build tab.
I have set the Bundle Loader and Test Host to the code shown in the developers article.

Thanks for any help!

Dan
isthisonetaken is offline   0 Reply With Quote
Old Nov 8, 2010, 12:45 PM   #2
szymczyk
macrumors regular
 
Join Date: Mar 2006
From what you posted, you're getting the expected behavior. The error message "Command /bin/sh failed with exit code 1." says the unit test failed. You're going to get this message if you have failing unit tests. A failing unit test is going to generate multiple errors: a "Command /bin/sh failed with exit code 1." message plus one error for each failing test.

The way to fix the error is to get all the unit tests to pass. When the unit tests pass the "Command /bin/sh failed with exit code 1." error will go away.
__________________
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
szymczyk is offline   0 Reply With Quote
Old Nov 8, 2010, 09:05 PM   #3
isthisonetaken
Thread Starter
macrumors regular
 
Join Date: Jun 2006
Thanks szymczyk! Now that I know that I can get on with learning how to use Unit Tests properly in my projects.

Dan
isthisonetaken is offline   0 Reply With Quote
Old Dec 16, 2010, 05:58 PM   #4
rzakarian
macrumors newbie
 
Join Date: Nov 2010
Quote:
Originally Posted by szymczyk View Post
From what you posted, you're getting the expected behavior. The error message "Command /bin/sh failed with exit code 1." says the unit test failed. You're going to get this message if you have failing unit tests. A failing unit test is going to generate multiple errors: a "Command /bin/sh failed with exit code 1." message plus one error for each failing test.

The way to fix the error is to get all the unit tests to pass. When the unit tests pass the "Command /bin/sh failed with exit code 1." error will go away.
You just saved my life
rzakarian is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Apple Testing Maps Notifications to Inform Users of Fixed Problems MacRumors MacRumors.com News Discussion 71 Apr 11, 2014 12:26 PM
Testing an app in ios 4.1 device with XCode 4.4 tutiplain iPhone/iPad Programming 0 Sep 29, 2012 02:02 PM
Problems switching views iOS & xcode Lonewolff iPhone/iPad Programming 2 Aug 27, 2012 09:04 AM
Problems with linking to Boost dylibs in Xcode TastyCocoa Mac Programming 2 Aug 17, 2012 04:58 AM
Xcode 4.5 problems - breakpoints I don't want and libc++abi.dylib uncaught exception moonman239 iPhone/iPad Programming 1 Jun 20, 2012 02:09 PM

Forum Jump

All times are GMT -5. The time now is 05:50 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC