From 9dbbb99c4bf1d848cb90cb0a12e9e769951d464f Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Mon, 3 Jan 2011 21:24:49 +0000 Subject: [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) --- UnitTesting/RunIPhoneUnitTest.sh | 53 ++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 24 deletions(-) (limited to 'UnitTesting/RunIPhoneUnitTest.sh') 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 -- cgit v1.2.3