Testing library separation: now not in launcher but isolated
[anna.git] / example / diameter / launcher / deployments / st-client / launchCPS.sh
1 #!/bin/bash
2
3 #############
4 # VARIABLES #
5 #############
6 ADML_INSTANCES=`cat .st_conf_adml_instances 2>/dev/null`
7
8 #############
9 # FUNCTIONS #
10 #############
11 _exit() {
12   echo
13   echo $1
14   echo
15   exit 1
16 }
17
18 #############
19 # EXECUTION #
20 #############
21 echo
22 echo
23 cd `dirname $0`
24 ./checkStatus.sh
25 [ $? -ne 0 ] && _exit "Fix status to continue ..."
26 echo
27 echo "Input desired rate (test cases per second) to start testing [0: stop if active]:"
28 read desired_rate
29 if [ "$desired_rate" != "" ]
30 then
31   rate_per_instance=$((desired_rate/$ADML_INSTANCES))
32 fi
33
34 echo
35 echo "As we have $ADML_INSTANCES instances available, we shall launch $rate_per_instance test cases"
36 echo " per second and instance (./operation.sh \"test|ttps|$rate_per_instance\")."
37 echo
38 echo "Press ENTER to continue, CTRL-C to abort ..."
39 read dummy
40 ./operation.sh "test|ttps|$rate_per_instance"
41