System test feature
[anna.git] / example / diameter / launcher / deployments / test_examples / cycle.sh
diff --git a/example/diameter/launcher/deployments/test_examples/cycle.sh b/example/diameter/launcher/deployments/test_examples/cycle.sh
new file mode 100755 (executable)
index 0000000..a16a62e
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Checking the correct cycle repeat and reports appending
+program () {
+
+  if [ "$2" = "ok" ]
+  then
+    ./operation.sh "test|$1|timeout|5000"
+    ./operation.sh "test|$1|delay|2000"
+    ./operation.sh "test|$1|delay|2000"
+  else
+    ./operation.sh "test|$1|timeout|5000"
+    ./operation.sh "test|$1|delay|2000"
+    ./operation.sh "test|$1|delay|4000"
+  fi
+}
+
+pkill ADML
+sleep 1
+./run.sh
+sleep 1
+./operation.sh "test|repeat|yes"
+./operation.sh "test|report|yes"
+
+COVERED_SECONDS=1
+for id in `seq 0 $((COVERED_SECONDS/2))`
+do
+  program $((2*id + 1)) ok
+  program $((2*id + 2)) nok
+done
+
+echo "Press ENTER to continue, CTRL+C to abort ..."
+read dummy
+./operation.sh "test|ttps|1"
+
+while true
+do
+  sleep 1
+  ./operation.sh "test|look"
+done
+