aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/RunIPhoneUnitTest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'UnitTesting/RunIPhoneUnitTest.sh')
-rwxr-xr-xUnitTesting/RunIPhoneUnitTest.sh53
1 files changed, 29 insertions, 24 deletions
diff --git a/UnitTesting/RunIPhoneUnitTest.sh b/UnitTesting/RunIPhoneUnitTest.sh
index fd8e305..69d3d8c 100755
--- a/UnitTesting/RunIPhoneUnitTest.sh
+++ b/UnitTesting/RunIPhoneUnitTest.sh
@@ -19,7 +19,8 @@
set -o errexit
set -o nounset
-set -o verbose
+# Uncomment the next line to trace execution.
+#set -o verbose
# Controlling environment variables:
# GTM_DISABLE_ZOMBIES -
@@ -100,25 +101,9 @@ if [ "$PLATFORM_NAME" == "iphonesimulator" ]; then
# See http://developer.apple.com/technotes/tn2004/tn2124.html for an
# explanation of these environment variables.
- export MallocScribble=YES
- export MallocPreScribble=YES
- export MallocGuardEdges=YES
- export MallocStackLogging=YES
- export NSAutoreleaseFreedObjectCheckEnabled=YES
-
- # Turn on the mostly undocumented OBJC_DEBUG stuff.
- export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES
- export OBJC_DEBUG_UNLOAD=YES
- # Turned off due to the amount of false positives from NS classes.
- # export OBJC_DEBUG_FINALIZERS=YES
- export OBJC_DEBUG_NIL_SYNC=YES
- export OBJC_PRINT_REPLACED_METHODS=YES
-
- if [ $GTM_DISABLE_ZOMBIES -eq 0 ]; then
- GTMXcodeNote ${LINENO} "Enabling zombies"
- export CFZombieLevel=3
- export NSZombieEnabled=YES
- fi
+ # NOTE: any setup work is done before turning on the environment variables
+ # to avoid having the setup work also get checked by what the variables
+ # enabled.
if [ $GTM_DISABLE_USERDIR_SETUP -eq 0 ]; then
# Cleanup user home directory
@@ -130,10 +115,6 @@ if [ "$PLATFORM_NAME" == "iphonesimulator" ]; then
mkdir -p "$CFFIXED_USER_HOME/Library/Caches"
fi
- # 6251475 iPhone simulator leaks @ CFHTTPCookieStore shutdown if
- # CFFIXED_USER_HOME empty
- GTM_LEAKS_SYMBOLS_TO_IGNORE="CFHTTPCookieStore"
-
if [ $GTM_DISABLE_IPHONE_LAUNCH_DAEMONS -eq 0 ]; then
# If we want to test anything that interacts with the keychain, we need
# securityd up and running. See RunIPhoneLaunchDaemons.sh for details.
@@ -142,6 +123,30 @@ if [ "$PLATFORM_NAME" == "iphonesimulator" ]; then
trap "launchctl remove RunIPhoneLaunchDaemons" INT TERM EXIT
fi
+ if [ $GTM_DISABLE_ZOMBIES -eq 0 ]; then
+ GTMXcodeNote ${LINENO} "Enabling zombies"
+ export CFZombieLevel=3
+ export NSZombieEnabled=YES
+ fi
+
+ export MallocScribble=YES
+ export MallocPreScribble=YES
+ export MallocGuardEdges=YES
+ export MallocStackLogging=YES
+ export NSAutoreleaseFreedObjectCheckEnabled=YES
+
+ # Turn on the mostly undocumented OBJC_DEBUG stuff.
+ export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES
+ export OBJC_DEBUG_UNLOAD=YES
+ # Turned off due to the amount of false positives from NS classes.
+ # export OBJC_DEBUG_FINALIZERS=YES
+ export OBJC_DEBUG_NIL_SYNC=YES
+ export OBJC_PRINT_REPLACED_METHODS=YES
+
+ # 6251475 iPhone simulator leaks @ CFHTTPCookieStore shutdown if
+ # CFFIXED_USER_HOME empty
+ GTM_LEAKS_SYMBOLS_TO_IGNORE="CFHTTPCookieStore"
+
# Start our app.
"$TARGET_BUILD_DIR/$EXECUTABLE_PATH" -RegisterForSystemEvents