diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-09-22 23:33:44 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-09-22 23:33:44 +0000 |
commit | 7bb8e9b9b24141f373ed70d7e6674a245c0227cf (patch) | |
tree | 8fab3cad46943aee24f213e041b2a7f6b71ea5df /UnitTesting/RunMacOSUnitTests.sh | |
parent | bfaf8705cccb15c0c2a7704b17ba011ddba8242f (diff) |
- Added GTMTestTimer.h for doing high fidelity timings.
- Added leaks checking to iPhone unit test script. It can be controlled by
the GTM_DISABLE_LEAKS environment variable
- Added ability to control using zombies to iPhone unit test script. It can be
controlled by the GTM_DISABLE_ZOMBIES environment variable
- Added ability to control termination to iPhone unit test script. It can be
controlled by the GTM_DISABLE_TERMINATION environment variable
- Fixed several leaks found with leak checking enabled.
- Added configs for different iPhone OS versions.
Diffstat (limited to 'UnitTesting/RunMacOSUnitTests.sh')
-rwxr-xr-x | UnitTesting/RunMacOSUnitTests.sh | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/UnitTesting/RunMacOSUnitTests.sh b/UnitTesting/RunMacOSUnitTests.sh index 45d0afc..5c36a79 100755 --- a/UnitTesting/RunMacOSUnitTests.sh +++ b/UnitTesting/RunMacOSUnitTests.sh @@ -19,21 +19,46 @@ # See http://developer.apple.com/technotes/tn2004/tn2124.html for details. # -export MallocScribble=YES -export MallocPreScribble=YES -export MallocGuardEdges=YES -# CFZombieLevel disabled because it doesn't play well with the -# security framework -# export CFZombieLevel=3 -export NSAutoreleaseFreedObjectCheckEnabled=YES -export NSZombieEnabled=YES -export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES +# Controlling environment variables: +# +# GTM_NO_MEMORY_STRESS - +# Set to zero to prevent the setting of system library/framework debugging +# environment variables that help find problems in code. See +# http://developer.apple.com/technotes/tn2004/tn2124.html +# for details. +# GTM_NO_DEBUG_FRAMEWORKS - +# Set to zero to prevent the use of the debug versions of system +# libraries/frameworks if you have them installed on your system. The frameworks +# can be found at http://connect.apple.com > Downloads > Developer Tools +# (https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19915) + +ScriptDir=$(dirname $(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")) +ScriptName=$(basename "$0") +ThisScript="${ScriptDir}/${ScriptName}" + +GTMXcodeNote() { + echo ${ThisScript}:${1}: note: GTM ${2} +} + +# Jack up some memory stress so we can catch more bugs. +if [ ! $GTM_NO_MEMORY_STRESS ]; then + GTMXcodeNote ${LINENO} "Enabling memory stressing" + export MallocScribble=YES + export MallocPreScribble=YES + export MallocGuardEdges=YES + # CFZombieLevel disabled because it doesn't play well with the + # security framework + # export CFZombieLevel=3 + export NSAutoreleaseFreedObjectCheckEnabled=YES + export NSZombieEnabled=YES + export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES +fi # If we have debug libraries on the machine, we'll use them # unless a target has specifically turned them off if [ ! $GTM_NO_DEBUG_FRAMEWORKS ]; then if [ -f "/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation_debug" ]; then - echo ---- Using _debug frameworks ---- + GTMXcodeNote ${LINENO} "Using _debug frameworks" export DYLD_IMAGE_SUFFIX=_debug fi fi |