aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/RuniOSUnitTestsUnderSimulator.sh
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-08-30 18:30:07 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-08-30 18:30:07 +0000
commitf35ca42210b1e04a3b26c3903af0511813f9ab5e (patch)
tree2e6cfc4cf122be29788823a32a8594121a4a2643 /UnitTesting/RuniOSUnitTestsUnderSimulator.sh
parent412eab8894ae6c258707eaf9c755fdcb6b2b5ed1 (diff)
Fix unset variables issue for user dir and env variables.
DELTA=18 (18 added, 0 deleted, 0 changed)
Diffstat (limited to 'UnitTesting/RuniOSUnitTestsUnderSimulator.sh')
-rwxr-xr-xUnitTesting/RuniOSUnitTestsUnderSimulator.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/UnitTesting/RuniOSUnitTestsUnderSimulator.sh b/UnitTesting/RuniOSUnitTestsUnderSimulator.sh
index 9bda002..073b7ea 100755
--- a/UnitTesting/RuniOSUnitTestsUnderSimulator.sh
+++ b/UnitTesting/RuniOSUnitTestsUnderSimulator.sh
@@ -37,6 +37,14 @@ GTM_SIMULATOR_SDK_VERSION=${GTM_SIMULATOR_SDK_VERSION:=default}
# on a VM, etc.; can cause the startup to take longer.
GTM_SIMULATOR_START_TIMEOUT=${GTM_SIMULATOR_START_TIMEOUT:=120}
+# GTM_SIMULATOR_USER_HOME -
+# Root directory for simulator file system. Allows persistence across runs.
+GTM_SIMULATOR_USER_HOME=${GTM_SIMULATOR_USER_HOME:=default}
+
+# GTM_SIMULATOR_EXTRA_ENV -
+# Space separated set env variables in format of "KEY1=value1 KEY2=value2"
+GTM_SIMULATOR_EXTRA_ENV=${GTM_SIMULATOR_EXTRA_ENV:=default}
+
# GTM_ENABLE_LEAKS -
# Set to a non-zero value to turn on the leaks check. You will probably want
# to disable zombies, otherwise you will get a lot of false positives.
@@ -176,6 +184,16 @@ GTM_TEST_COMMAND=(
if [[ "${GTM_SIMULATOR_SDK_VERSION}" != "default" ]] ; then
GTM_TEST_COMMAND+=( "-s" "${GTM_SIMULATOR_SDK_VERSION}" )
fi
+if [[ "${GTM_SIMULATOR_USER_HOME}" != "default" ]]; then
+ GTM_TEST_COMMAND+=( "-u" "${GTM_SIMULATOR_USER_HOME}" )
+fi
+if [[ "${GTM_SIMULATOR_EXTRA_ENV}" != "default" ]]; then
+ EXTRA_ENV_ARRAY=(${GTM_SIMULATOR_EXTRA_ENV})
+ for i in "${!EXTRA_ENV_ARRAY[@]}"
+ do
+ GTM_TEST_COMMAND+=( "-e" ${EXTRA_ENV_ARRAY[i]} )
+ done
+fi
if [[ -n "${TEST_HOST}" ]]; then
# When using a test host, it is usually set to the executable within the app
# bundle, back up one to point at the bundle.