Fork variant for TestStep command
[anna.git] / example / diameter / launcher / deployments / test_examples / cycle.sh
1 #!/bin/sh
2 # Checking the correct cycle repeat and reports appending
3 program () {
4
5   if [ "$2" = "ok" ]
6   then
7     ./operation.sh "test|$1|timeout|5000"
8     ./operation.sh "test|$1|delay|2000"
9     ./operation.sh "test|$1|delay|2000"
10   else
11     ./operation.sh "test|$1|timeout|5000"
12     ./operation.sh "test|$1|delay|2000"
13     ./operation.sh "test|$1|delay|4000"
14   fi
15 }
16
17 pkill ADML
18 sleep 1
19 ./run.sh
20 sleep 1
21 ./operation.sh "test|repeat|yes"
22 ./operation.sh "test|report|yes"
23
24 COVERED_SECONDS=1
25 for id in `seq 0 $((COVERED_SECONDS/2))`
26 do
27   program $((2*id + 1)) ok
28   program $((2*id + 2)) nok
29 done
30
31 echo "Press ENTER to continue, CTRL+C to abort ..."
32 read dummy
33 ./operation.sh "test|ttps|1"
34
35 while true
36 do
37   sleep 1
38   ./operation.sh "test|look"
39 done
40