From: Razvan Deaconescu Date: Fri, 6 Aug 2010 14:47:59 +0000 (+0300) Subject: ControlScripts: working version of schedule_client scripts with pre-run/post-run... X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=e1bf81fe56bc9554accc85df696b38564837ead3;p=p2p-testing-infrastructure.git ControlScripts: working version of schedule_client scripts with pre-run/post-run script-awareness --- diff --git a/ControlScripts/schedule_client.sh b/ControlScripts/schedule_client.sh index 325e2df..ac23869 100755 --- a/ControlScripts/schedule_client.sh +++ b/ControlScripts/schedule_client.sh @@ -8,18 +8,13 @@ # * manages when client completes # use _DEBUG="off" to turn off debug printing -_DEBUG="off" - -DEBUG() -{ - test ${_DEBUG} = "on" && $@ -} +_DEBUG="on" # Read the global configuration variables source ../ConfigFiles/globalconfig # Read scenarion configuration file -source ${BASE_PATH}/ClientWorkingFolders/TmpLogs/scenario_config +source ../ClientWorkingFolders/TmpLogs/scenario_config # Read client mappings configuration file source ../ConfigFiles/client_script_mappings @@ -35,6 +30,7 @@ parse_periods() local tmp_array=($(echo "$PERIODS" | sed 's/[,()]/ /g')) start_time=${tmp_array[0]} local len=${#tmp_array[@]} + DEBUG echo "PERIODS: $PERIODS" stop_time=${tmp_array[$(($len-1))]} @@ -76,7 +72,8 @@ DEBUG echo "stop_time is ${stop_time}" to_sleep=${start_time} sleep ${to_sleep} -start_client +DEBUG echo "CLIENT_TYPE is ${CLIENT_TYPE}" +start_client ${CLIENT_TYPE} background_pid=$! DEBUG echo "background_pid is ${background_pid}" old_time=${start_time} @@ -103,4 +100,4 @@ test_infinite ${stop_time} to_sleep=$((${stop_time} - ${old_time})) sleep ${to_sleep} -stop_client +stop_client ${CLIENT_TYPE}