aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/RunIPhoneUnitTest.sh
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-01-03 21:24:49 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-01-03 21:24:49 +0000
commit9dbbb99c4bf1d848cb90cb0a12e9e769951d464f (patch)
treebdc6d8122408db4a71b88f66b56702ac323a3bc9 /UnitTesting/RunIPhoneUnitTest.sh
parentbc792e3a15288685a7859aca8d49bba891852bd3 (diff)
[Author: thomasvl]
Turn off echoing of commands to avoid some of the chatter in Xcode (since it shows everything now) Move where the memory tracing environment variables are set to avoid tracing the commands run before the test (as much as possible). R=dmaclach DELTA=109 (62 added, 45 deleted, 2 changed)
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