<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-dev/+/26485">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add tmux scripts for ttcn3-{msc,bsc,bts}-test<br><br>Change-Id: I201b77c013cbeef9d1a07b9422b27f375811ed69<br>---<br>A ttcn3/tmux/ttcn3-bsc-test.sh<br>A ttcn3/tmux/ttcn3-bts-test.sh<br>A ttcn3/tmux/ttcn3-msc-test.sh<br>3 files changed, 123 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/85/26485/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/ttcn3/tmux/ttcn3-bsc-test.sh b/ttcn3/tmux/ttcn3-bsc-test.sh</span><br><span>new file mode 100755</span><br><span>index 0000000..c0d9709</span><br><span>--- /dev/null</span><br><span>+++ b/ttcn3/tmux/ttcn3-bsc-test.sh</span><br><span>@@ -0,0 +1,43 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/bin/sh</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+SESSION="ttcn3-bsc-test"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+OSMO_DIR="/home/$USER/osmocom"</span><br><span style="color: hsl(120, 100%, 40%);">+SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"</span><br><span style="color: hsl(120, 100%, 40%);">+RESPAWN="$OSMO_DIR/scripts/respawn.sh"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -d $SUITE_DIR ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Directory '$SUITE_DIR' does not exist"</span><br><span style="color: hsl(120, 100%, 40%);">+        echo "Please specify where to find osmo-ttcn3-hacks"</span><br><span style="color: hsl(120, 100%, 40%);">+        exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -f $RESPAWN ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+      echo "Script '$RESPAWN' does not exist"</span><br><span style="color: hsl(120, 100%, 40%);">+     echo "Please specify where to find respawn.sh"</span><br><span style="color: hsl(120, 100%, 40%);">+      exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux new-session -s $SESSION -n $SESSION -d</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:0 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/bsc" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.0 "osmo-bsc -c osmo-bsc.cfg" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/bsc" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./BSC_Tests BSC_Tests.cfg"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux new-window -t $SESSION:1</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:1 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:1 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:1 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:1 -v</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Start osmo-stp</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/bsc" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.0 "osmo-stp -c osmo-stp.cfg" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+# Start osmo-bts-omldummy</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.1 "$RESPAWN osmo-bts-omldummy 127.0.0.1 1234" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.2 "$RESPAWN osmo-bts-omldummy 127.0.0.1 1235" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.3 "$RESPAWN osmo-bts-omldummy 127.0.0.1 1236" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux attach -t $SESSION:0</span><br><span>diff --git a/ttcn3/tmux/ttcn3-bts-test.sh b/ttcn3/tmux/ttcn3-bts-test.sh</span><br><span>new file mode 100755</span><br><span>index 0000000..25a3351</span><br><span>--- /dev/null</span><br><span>+++ b/ttcn3/tmux/ttcn3-bts-test.sh</span><br><span>@@ -0,0 +1,54 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/bin/sh</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+SESSION="ttcn3-bts-test"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+OSMO_DIR="/home/$USER/osmocom"</span><br><span style="color: hsl(120, 100%, 40%);">+OBB_DIR="$OSMO_DIR/osmocom-bb"</span><br><span style="color: hsl(120, 100%, 40%);">+SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"</span><br><span style="color: hsl(120, 100%, 40%);">+RESPAWN="$OSMO_DIR/scripts/respawn.sh"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -d $SUITE_DIR ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+  echo "Directory '$SUITE_DIR' does not exist"</span><br><span style="color: hsl(120, 100%, 40%);">+        echo "Please specify where to find osmo-ttcn3-hacks"</span><br><span style="color: hsl(120, 100%, 40%);">+        exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -d $OBB_DIR ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+      echo "Directory '$OBB_DIR' does not exist"</span><br><span style="color: hsl(120, 100%, 40%);">+  echo "Please specify where to find osmocom-bb"</span><br><span style="color: hsl(120, 100%, 40%);">+      exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -f $RESPAWN ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+      echo "Script '$RESPAWN' does not exist"</span><br><span style="color: hsl(120, 100%, 40%);">+     echo "Please specify where to find respawn.sh"</span><br><span style="color: hsl(120, 100%, 40%);">+      exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux new-session -s $SESSION -n $SESSION -d</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:0 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/bts" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.0 "$RESPAWN osmo-bts-trx -c osmo-bts.cfg"</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/bts" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./BTS_Tests cfg/BTS_Tests.cfg"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux new-window -t $SESSION:1</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:1 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:1 -v</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Start osmo-bsc</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/bts" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.0 "osmo-bsc -c osmo-bsc.cfg" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+# Start trxcon</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.1 "cd $OBB_DIR/src/host/trxcon" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.1 "./trxcon -s /tmp/osmocom_l2.ttcn" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+# Start fake_trx.py</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.2 "cd $OBB_DIR/src/target/trx_toolkit" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.2 "./fake_trx.py \</span><br><span style="color: hsl(120, 100%, 40%);">+                                    --trx TRX1@127.0.0.1:5700/1 \</span><br><span style="color: hsl(120, 100%, 40%);">+                                 --trx TRX1@127.0.0.1:5700/2 \</span><br><span style="color: hsl(120, 100%, 40%);">+                                 --trx TRX1@127.0.0.1:5700/3" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux attach -t $SESSION:0</span><br><span>diff --git a/ttcn3/tmux/ttcn3-msc-test.sh b/ttcn3/tmux/ttcn3-msc-test.sh</span><br><span>new file mode 100755</span><br><span>index 0000000..fee1383</span><br><span>--- /dev/null</span><br><span>+++ b/ttcn3/tmux/ttcn3-msc-test.sh</span><br><span>@@ -0,0 +1,26 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/bin/sh</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+SESSION="ttcn3-msc-test"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+OSMO_DIR="/home/$USER/osmocom"</span><br><span style="color: hsl(120, 100%, 40%);">+SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -d $SUITE_DIR ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+  echo "Directory '$SUITE_DIR' does not exist"</span><br><span style="color: hsl(120, 100%, 40%);">+        echo "Please specify where to find osmo-ttcn3-hacks"</span><br><span style="color: hsl(120, 100%, 40%);">+        exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux new-session -s $SESSION -n $SESSION -d</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux split-window -t $SESSION:0 -v</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/msc" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.0 "osmo-msc -c osmo-msc.cfg" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/msc" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./MSC_Tests MSC_Tests.cfg"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux new-window -t $SESSION:1</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/msc" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+tmux send-keys -t $SESSION:1.0 "osmo-stp -c osmo-stp.cfg" C-m</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+tmux attach -t $SESSION:0</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-dev/+/26485">change 26485</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-dev/+/26485"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-dev </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I201b77c013cbeef9d1a07b9422b27f375811ed69 </div>
<div style="display:none"> Gerrit-Change-Number: 26485 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>