Fixes & improvements
[anna.git] / example / diameter / launcher / deployments / st-client / program.sh
index 93cd866..84c66e9 100755 (executable)
@@ -22,8 +22,11 @@ _exit() {
 usage() {
   echo "Usage: $0 <test stuff directory> [-s]"
   echo
+  echo "       Performs test case programming from scratch (current test cases will be dropped from ADML involved instances)."
+  echo
   echo "       test stuff directory: contains msk files, specially a testcase description with xml files referenced."
   echo "                             Those files, adding .msk extension, shall exists in the same directory. For example:"
+  echo
   echo "                                $0 st_examples/DynamicQualification"
   echo
   echo "       -s: start testing just after programming, using desired rate: $DESIRED_RATE test cases per second."
@@ -52,6 +55,8 @@ miss_conf=
 
 echo
 [ -z "$1" ] && usage
+./operation.sh --ping
+[ $? -ne 0 ] && _exit "Programming aborted (some ADML client process is not running) !"
 TESTCASE_DIR=$1
 AUTOSTART=$2
 
@@ -60,10 +65,9 @@ TESTCASE=( `ls $TESTCASE_DIR/testcase*msk 2>/dev/null` )
 TESTCASE_FILES=${#TESTCASE[@]}
 [ $TESTCASE_FILES -ne 1 ] && _exit "One and only one 'testcase*msk' file must be present !!"
 
-#CLONE_GROUPS=1
 MAX_NUMBER_GROUPS=$(grep ^MAX_NUMBER_GROUPS= clone.sh | cut -d= -f2)
-ADML_INSTANCES=`cat .st_conf_adml_instances`
 CLONE_GROUPS=$((MAX_NUMBER_GROUPS/ADML_INSTANCES))
+#CLONE_GROUPS=1
 
 children_before=$(children)
 while read -r line
@@ -92,6 +96,8 @@ echo
 echo "Configuring repeat cycles ..."
 ./operation.sh "test|repeats|$REPEATS"
 
+echo
+echo
 start_testing=
 if [ "$AUTOSTART" = "-s" ]
 then