summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Raymond <kraymond@avencall.com>2012-11-14 19:05:10 +0100
committerKévin Raymond <kraymond@avencall.com>2012-11-14 19:06:52 +0100
commit6e000c87c110999cc97844dffcc5b4cd29f67226 (patch)
tree47c35a0b04ac017003c6647a7d98ee9cf83ad85b
parentb610c6d28af22728d48581b4333a5a177f7522bc (diff)
adding calls to CEM tests
-rw-r--r--board/cem/README19
-rw-r--r--board/cem/screen_cem6
-rwxr-xr-xboard/cem/start_calls.sh76
-rw-r--r--board/massive_call/README7
4 files changed, 96 insertions, 12 deletions
diff --git a/board/cem/README b/board/cem/README
index 150b562..9f32256 100644
--- a/board/cem/README
+++ b/board/cem/README
@@ -10,14 +10,19 @@ A computer should be connected to the driver.
This repo has to be cloned on the driver.
To run them:
-* interconnect all ports but the serials
-* log to the driver from your computer throught minicom
- minicom -D /dev/ttyUSB0
-* run the eth load
- screen -c ~/xioh-acceptance/board/cem/screen_cem
-* run the phone load
- #TODO
+ * interconnect all ports but the serials
+ * log to the driver from your computer throught minicom
+ minicom -D /dev/ttyUSB0
+
+ * setup the boards correctly with:
+
+ cd ~/xioh-acceptance/board/full_IO
+ ./install.sh te
+
+ * run load the system
+
+ screen -c ~/xioh-acceptance/board/cem/screen_cem
diff --git a/board/cem/screen_cem b/board/cem/screen_cem
index 8c533cf..ac23190 100644
--- a/board/cem/screen_cem
+++ b/board/cem/screen_cem
@@ -16,3 +16,9 @@ screen -t "-qc"
stuff "/bin/sleep 6 "
stuff "/bin/bash start_eth_perf.sh "
+screen -t "-qc-ast"
+ stuff "asterisk -rv "
+
+screen -t "-qc-calls"
+ stuff "/bin/bash start_calls.sh "
+
diff --git a/board/cem/start_calls.sh b/board/cem/start_calls.sh
new file mode 100755
index 0000000..bcc4e12
--- /dev/null
+++ b/board/cem/start_calls.sh
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+MAIN_PID=$$
+KILL_CMD="k"
+DELAY=8
+POOL="/var/spool/asterisk/outgoing/"
+
+exec > >(tee -a calls.log)
+exec 2>&1
+
+if [ "@$FULL_IO_PATH" = "@" ]
+then
+ if [ -d "../full_IO" ]
+ then
+ FULL_IO_PATH="../full_IO"
+ else
+ echo "Error, FULL_IO_PATH undefined"
+ exit 122
+ fi
+fi
+
+if [ ! -f "$FULL_IO_PATH/install.sh" ]
+then
+ echo "Error, the install script is not found"
+ exit 123
+fi
+
+send_call()
+{
+ [ -f "$POOL$1" ] || cp -a $FULL_IO_PATH/call/$1 $POOL
+}
+
+fxs_call()
+{
+ while true
+ do
+ send_call call51
+ sleep $DELAY
+ done
+}
+
+
+fxo_call()
+{
+ while true
+ do
+ send_call call52
+ sleep $DELAY
+ done
+}
+
+isdn_call()
+{
+ while true
+ do
+ send_call call44
+ sleep $DELAY
+ done
+}
+
+echo "== Starting, press \`$KILL_CMD' to stop =="
+
+fxs_call &
+fxo_call &
+isdn_call &
+
+while read i
+do
+ [ "$i" = "$KILL_CMD" ] && break
+done
+
+echo "Complete! Killing all child now"
+sleep 1
+
+kill -9 -$MAIN_PID
+
diff --git a/board/massive_call/README b/board/massive_call/README
index 8bdee26..8900c11 100644
--- a/board/massive_call/README
+++ b/board/massive_call/README
@@ -6,10 +6,7 @@
$ ./update_boards.sh
+root@xivo-46 ~ # screen -c massive_screen
-while [ $? -eq 0 ]; do sleep 1 && nc 127.0.0.1 5038 -e ./run.sh; done
-
-while true; do sleep 5 && cat pool; done
-
-screen -c massive_screen
+(we should not work as root)