diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-09-27 15:30:11 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-09-27 15:30:11 +0000 |
commit | 149228e736203085b58fa33a39a5ccd0649fea1b (patch) | |
tree | ff9a4b4378120807237c940087c19851a2574cb3 /UnitTesting | |
parent | 2e729e97f95dd2927f5ceabc41578306f8ed6f8a (diff) |
Extend the default timeout for killing apps and allow it to be controlled via
an environment variable.
DELTA=8 (6 added, 0 deleted, 2 changed)
Diffstat (limited to 'UnitTesting')
-rwxr-xr-x | UnitTesting/RuniOSUnitTestsUnderSimulator.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/UnitTesting/RuniOSUnitTestsUnderSimulator.sh b/UnitTesting/RuniOSUnitTestsUnderSimulator.sh index 073b7ea..6fc6ee5 100755 --- a/UnitTesting/RuniOSUnitTestsUnderSimulator.sh +++ b/UnitTesting/RuniOSUnitTestsUnderSimulator.sh @@ -37,6 +37,12 @@ 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_KILL_SLEEP_TIME +# Controls the time the script will sleep when it kills a process. Things +# like machine load, running on a VM, etc.; can cause the time for things to +# die to take longer. +GTM_KILL_SLEEP_TIME=${GTM_KILL_SLEEP_TIME:=5} + # GTM_SIMULATOR_USER_HOME - # Root directory for simulator file system. Allows persistence across runs. GTM_SIMULATOR_USER_HOME=${GTM_SIMULATOR_USER_HOME:=default} @@ -107,10 +113,10 @@ GTMFakeUnitTestingMsg() { } GTMKillNamedAndWait() { - # If there is something killed, sleep for few seconds to let the simulator + # If there is something killed, sleep for few seconds to let the process # spin down so it isn't still seen as running when the next thing tries to # launch it. - /usr/bin/killall "${1}" 2> /dev/null && sleep 2 || true + /usr/bin/killall "${1}" 2> /dev/null && sleep "${GTM_KILL_SLEEP_TIME}" || true } GTMKillSimulator() { |