From d4de0580824ea0e908be669e30c63ae3696975d0 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 8 Oct 2014 15:30:05 +0000 Subject: Use 'iOS Simulator' for Xcode6 and 'iPhone Simulator' for earlier versions to kill the simulator process. DELTA=8 (7 added, 0 deleted, 1 changed) DELTA_BY_EXTENSION=sh=8 --- UnitTesting/RuniOSUnitTestsUnderSimulator.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'UnitTesting') diff --git a/UnitTesting/RuniOSUnitTestsUnderSimulator.sh b/UnitTesting/RuniOSUnitTestsUnderSimulator.sh index 6fc6ee5..20efc45 100755 --- a/UnitTesting/RuniOSUnitTestsUnderSimulator.sh +++ b/UnitTesting/RuniOSUnitTestsUnderSimulator.sh @@ -85,6 +85,13 @@ readonly ScriptName=$(basename "$0") readonly ThisScript="${ScriptDir}/${ScriptName}" readonly SimExecutable="${ScriptDir}/iossim" +# Simulator process name changes from Xcode 6. +if [[ ${XCODE_VERSION_MINOR} -ge "0600" ]]; then + readonly SimulatorProcessName='iOS Simulator' +else + readonly SimulatorProcessName='iPhone Simulator' +fi + # Variables that follow Xcode unittesting conventions readonly TEST_BUNDLE_PATH="${TEST_BUNDLE_PATH:=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}}" TEST_HOST="${TEST_HOST:=}" @@ -120,7 +127,7 @@ GTMKillNamedAndWait() { } GTMKillSimulator() { - GTMKillNamedAndWait "iPhone Simulator" + GTMKillNamedAndWait "${SimulatorProcessName}" } # Honor TEST_AFTER_BUILD if requested. -- cgit v1.2.3