aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/RunIPhoneUnitTest.sh
diff options
context:
space:
mode:
authorGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-09-10 21:04:47 +0000
committerGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-09-10 21:04:47 +0000
commitbfaf8705cccb15c0c2a7704b17ba011ddba8242f (patch)
treeb48e104487ee5e29522da1bce6accafa007e29cf /UnitTesting/RunIPhoneUnitTest.sh
parent0f0f40db85a2c295a9b6dc1623cd76106a4448a5 (diff)
- Added GTMExceptionalInlines for dealing with cases where you get
warning: variable 'r' might be clobbered by 'longjmp' or 'vfork' when using certain Apple inlined functions in @synchronized/@try blocks. - Updated to Xcode 3.1 so the GTM and iPhone project have the same baseline. The code should work in other version of xcode, but the projects and xcconfig files now use 3.1 features. - Added GTMABAddressBook which is a cocoa wrapper for the 'C' AddressBook APIs on the iPhone. - Added several set environment variable statements to RunIPhoneUnitTest.sh to encourage bugs to come out of the woodwork.
Diffstat (limited to 'UnitTesting/RunIPhoneUnitTest.sh')
-rwxr-xr-xUnitTesting/RunIPhoneUnitTest.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/UnitTesting/RunIPhoneUnitTest.sh b/UnitTesting/RunIPhoneUnitTest.sh
index 9c09622..0089032 100755
--- a/UnitTesting/RunIPhoneUnitTest.sh
+++ b/UnitTesting/RunIPhoneUnitTest.sh
@@ -17,11 +17,27 @@
# Runs all unittests through the iPhone simulator. We don't handle running them
# on the device. To run on the device just choose "run".
+
if [ "$IPHONEOS_DEPLOYMENT_TARGET" == "" ]; then
+ # We kill the iPhone simulator because otherwise we run into issues where
+ # the unittests fail becuase the simulator is currently running, and
+ # at this time the iPhone SDK won't allow two simulators running at the same
+ # time.
+ /usr/bin/killall "iPhone Simulator"
export DYLD_ROOT_PATH="$SDKROOT"
export DYLD_FRAMEWORK_PATH="$CONFIGURATION_BUILD_DIR"
export IPHONE_SIMULATOR_ROOT="$SDKROOT"
export CFFIXED_USER_HOME="$USER_LIBRARY_DIR/Application Support/iPhone Simulator/User"
+
+ # Encourage errors
+ export MallocScribble=YES
+ export MallocPreScribble=YES
+ export MallocGuardEdges=YES
+ export CFZombieLevel=3
+ export NSAutoreleaseFreedObjectCheckEnabled=YES
+ export NSZombieEnabled=YES
+ export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES
+
"$TARGET_BUILD_DIR/$EXECUTABLE_PATH" -RegisterForSystemEvents
else
echo "note: Skipping running of unittests for device build."