aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2014-10-08 15:30:05 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2014-10-08 15:30:05 +0000
commitd4de0580824ea0e908be669e30c63ae3696975d0 (patch)
treed644e1b7ee3c9b1729cd7b222f55e860a6f8f4d7 /UnitTesting
parent1d4e5298ed7d107c38dd56a6796c8c59caf8391b (diff)
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
Diffstat (limited to 'UnitTesting')
-rwxr-xr-xUnitTesting/RuniOSUnitTestsUnderSimulator.sh9
1 files changed, 8 insertions, 1 deletions
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.