08bf4955bb069c2ad63a8d89522321791e6d0372
[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 echo "This configures $rate_per_instance test cases per second and instance"
34 echo " (there are $ADML_INSTANCES instances available)".
35 echo
36 echo "Press ENTER to continue, CTRL-C to abort ..."
37 read dummy
38
39 ./operation.sh "test|ttps|$rate_per_instance"
40