aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/RunMacOSUnitTests.sh
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-27 17:15:24 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-27 17:15:24 +0000
commite3c268753ab7a8cf62bdf66d64d86707a850a933 (patch)
tree24c0380f59a0ec0d5f9999e53ea634c0b1b974c1 /UnitTesting/RunMacOSUnitTests.sh
parent6545da262e160fc959e1fe869c517daeff1e184e (diff)
[Author: dmaclach]
Change build script so that it removes all of the gcda files for the current config project wide, which in general is what people will want. Added unit testing to GTMHotKeyTextField. From about 6% up to 90%. DELTA=10 (3 added, 0 deleted, 7 changed) R=thomasvl
Diffstat (limited to 'UnitTesting/RunMacOSUnitTests.sh')
-rwxr-xr-xUnitTesting/RunMacOSUnitTests.sh24
1 files changed, 15 insertions, 9 deletions
diff --git a/UnitTesting/RunMacOSUnitTests.sh b/UnitTesting/RunMacOSUnitTests.sh
index 9aa83e4..d184566 100755
--- a/UnitTesting/RunMacOSUnitTests.sh
+++ b/UnitTesting/RunMacOSUnitTests.sh
@@ -43,10 +43,16 @@
# Please feel free to add other symbols as you find them but make sure to
# reference Radars or other bug systems so we can track them.
#
-# GTM_REMOVE_GCOV_DATA
-# Before starting the test, remove any *.gcda files for the current run so
-# you won't get errors when the source file has changed and the data can't
-# be merged.
+# GTM_DO_NOT_REMOVE_GCOV_DATA
+# By default before starting the test, we remove any *.gcda files for the
+# current project build configuration so you won't get errors when a source
+# file has changed and the gcov data can't be merged.
+# We remove all the gcda files for the current configuration for the entire
+# project so that if you are building a test bundle to test another separate
+# bundle we make sure to clean up the files for the test bundle and the bundle
+# that you are testing.
+# If you DO NOT want this to occur, set GTM_DO_NOT_REMOVE_GCOV_DATA to a
+# non-zero value.
#
ScriptDir=$(dirname $(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,"))
@@ -200,11 +206,11 @@ if [ ! $GTM_DISABLE_ZOMBIES ]; then
export NSZombieEnabled=YES
fi
-if [ $GTM_REMOVE_GCOV_DATA ]; then
- if [ "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" != "-" ]; then
- if [ -d "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" ]; then
- GTMXcodeNote ${LINENO} "Removing any .gcda files"
- (cd "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" && \
+if [ ! $GTM_DO_NOT_REMOVE_GCOV_DATA ]; then
+ if [ "${CONFIGURATION_TEMP_DIR}" != "-" ]; then
+ if [ -d "${CONFIGURATION_TEMP_DIR}" ]; then
+ GTMXcodeNote ${LINENO} "Removing gcov data files from ${CONFIGURATION_TEMP_DIR}"
+ (cd "${CONFIGURATION_TEMP_DIR}" && \
find . -type f -name "*.gcda" -print0 | xargs -0 rm -f )
fi
fi