diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-08-06 21:30:11 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-08-06 21:30:11 +0000 |
commit | 61732104b91222d1f0632a4dc261afd0b66a45e5 (patch) | |
tree | f9e33fe2fb3625fe7a5db8f2a72f34550540361a /UnitTesting/RunIPhoneUnitTest.sh | |
parent | 2eb12c981ac9880536ebb13249f01fd7a226548e (diff) |
[Author: thomasvl]
But in a version check and error out if the Xcode version appears to be
too new for support the way unittests are run.
R=dmaclach
DELTA=15 (14 added, 0 deleted, 1 changed)
Diffstat (limited to 'UnitTesting/RunIPhoneUnitTest.sh')
-rwxr-xr-x | UnitTesting/RunIPhoneUnitTest.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/UnitTesting/RunIPhoneUnitTest.sh b/UnitTesting/RunIPhoneUnitTest.sh index 1cb07d4..743d1ec 100755 --- a/UnitTesting/RunIPhoneUnitTest.sh +++ b/UnitTesting/RunIPhoneUnitTest.sh @@ -75,9 +75,14 @@ GTM_USE_TEST_AFTER_BUILD=${GTM_USE_TEST_AFTER_BUILD:=0} ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") ScriptName=$(basename "$0") ThisScript="${ScriptDir}/${ScriptName}" +XCODE_VERSION_MINOR=${XCODE_VERSION_MINOR:=0000} GTMXcodeNote() { - echo ${ThisScript}:${1}: note: GTM ${2} + echo "${ThisScript}:${1}: note: GTM ${2}" +} + +GTMXcodeError() { + echo "${ThisScript}:${1}: error: GTM ${2}" } # Creates a file containing the plist for the securityd daemon and prints the @@ -103,6 +108,15 @@ GTMCreateLaunchDaemonPlist() { if [[ "$GTM_USE_TEST_AFTER_BUILD" == 1 && "$TEST_AFTER_BUILD" == "NO" ]]; then GTMXcodeNote ${LINENO} "Skipping running of unittests since TEST_AFTER_BUILD=NO." elif [ "$PLATFORM_NAME" == "iphonesimulator" ]; then + # Xcode 4.5 changed how simulator app can be run. The way this script has + # been working results in them now just logging a message and calling exit(0) + # from Apple code. Report the error that the tests aren't going to work. + if [[ "${XCODE_VERSION_MINOR}" -ge "0450" ]]; then + GTMXcodeError ${LINENO} \ + "Unit testing process not supported on Xcode >= 4.5 (${XCODE_VERSION_MINOR}). Use RuniOSUnitTestsUnderSimulator.sh." + exit 1 + fi + # We kill the iPhone simulator because otherwise we run into issues where # the unittests fail becuase the simulator is currently running, and # at this time the iPhone SDK won't allow two simulators running at the same |