Add tmux scripts for ttcn3-{msc,bsc,bts}-test

Change-Id: I201b77c013cbeef9d1a07b9422b27f375811ed69
changes/85/26485/5
Vadim Yanitskiy 1 year ago committed by fixeria
parent a3a1a0d94a
commit 3414a48340
  1. 9
      README
  2. 43
      ttcn3/tmux/ttcn3-bsc-test.sh
  3. 54
      ttcn3/tmux/ttcn3-bts-test.sh
  4. 26
      ttcn3/tmux/ttcn3-msc-test.sh

@ -169,6 +169,15 @@ https://osmocom.org/projects/cellular-infrastructure/wiki/Titan_TTCN3_Testsuites
[1] https://jenkins.osmocom.org/jenkins/view/TTCN3/
=== ttcn3/tmux
It's possible to run TTCN-3 test cases without using Docker. This directory
contains scripts for starting a testsuite and the related binaries in a tmux
session. For example, ttcn3-bsc-test.sh does the following:
* Starts osmo-bsc, osmo-stp, and three instances of osmo-bts-omldummy.
* Prepares a command for execuring the test suite.
=== Troubleshooting
When using sanitize.opts, osmo-trx is not built with the address sanitizer

@ -0,0 +1,43 @@
#!/bin/sh
SESSION="ttcn3-bsc-test"
OSMO_DIR="/home/$USER/osmocom"
SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"
RESPAWN="$OSMO_DIR/scripts/respawn.sh"
if [ ! -d $SUITE_DIR ]; then
echo "Directory '$SUITE_DIR' does not exist"
echo "Please specify where to find osmo-ttcn3-hacks"
exit 1
fi
if [ ! -f $RESPAWN ]; then
echo "Script '$RESPAWN' does not exist"
echo "Please specify where to find respawn.sh"
exit 1
fi
tmux new-session -s $SESSION -n $SESSION -d
tmux split-window -t $SESSION:0 -v
tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/bsc" C-m
tmux send-keys -t $SESSION:0.0 "osmo-bsc -c osmo-bsc.cfg" C-m
tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/bsc" C-m
tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./BSC_Tests BSC_Tests.cfg"
tmux new-window -t $SESSION:1
tmux split-window -t $SESSION:1 -v
tmux split-window -t $SESSION:1 -v
tmux split-window -t $SESSION:1 -v
tmux split-window -t $SESSION:1 -v
# Start osmo-stp
tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/bsc" C-m
tmux send-keys -t $SESSION:1.0 "osmo-stp -c osmo-stp.cfg" C-m
# Start osmo-bts-omldummy
tmux send-keys -t $SESSION:1.1 "$RESPAWN osmo-bts-omldummy 127.0.0.1 1234" C-m
tmux send-keys -t $SESSION:1.2 "$RESPAWN osmo-bts-omldummy 127.0.0.1 1235" C-m
tmux send-keys -t $SESSION:1.3 "$RESPAWN osmo-bts-omldummy 127.0.0.1 1236" C-m
tmux attach -t $SESSION:0

@ -0,0 +1,54 @@
#!/bin/sh
SESSION="ttcn3-bts-test"
OSMO_DIR="/home/$USER/osmocom"
OBB_DIR="$OSMO_DIR/osmocom-bb"
SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"
RESPAWN="$OSMO_DIR/scripts/respawn.sh"
if [ ! -d $SUITE_DIR ]; then
echo "Directory '$SUITE_DIR' does not exist"
echo "Please specify where to find osmo-ttcn3-hacks"
exit 1
fi
if [ ! -d $OBB_DIR ]; then
echo "Directory '$OBB_DIR' does not exist"
echo "Please specify where to find osmocom-bb"
exit 1
fi
if [ ! -f $RESPAWN ]; then
echo "Script '$RESPAWN' does not exist"
echo "Please specify where to find respawn.sh"
exit 1
fi
tmux new-session -s $SESSION -n $SESSION -d
tmux split-window -t $SESSION:0 -v
tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/bts" C-m
tmux send-keys -t $SESSION:0.0 "$RESPAWN osmo-bts-trx -c osmo-bts.cfg"
tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/bts" C-m
tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./BTS_Tests BTS_Tests.cfg"
tmux new-window -t $SESSION:1
tmux split-window -t $SESSION:1 -v
tmux split-window -t $SESSION:1 -v
# Start osmo-bsc
tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/bts" C-m
tmux send-keys -t $SESSION:1.0 "osmo-bsc -c osmo-bsc.cfg" C-m
# Start trxcon
tmux send-keys -t $SESSION:1.1 "cd $OBB_DIR/src/host/trxcon" C-m
tmux send-keys -t $SESSION:1.1 "./trxcon -s /tmp/osmocom_l2" C-m
# Start fake_trx.py
tmux send-keys -t $SESSION:1.2 "cd $OBB_DIR/src/target/trx_toolkit" C-m
tmux send-keys -t $SESSION:1.2 "./fake_trx.py \
--trx TRX1@127.0.0.1:5700/1 \
--trx TRX1@127.0.0.1:5700/2 \
--trx TRX1@127.0.0.1:5700/3" C-m
tmux attach -t $SESSION:0

@ -0,0 +1,26 @@
#!/bin/sh
SESSION="ttcn3-msc-test"
OSMO_DIR="/home/$USER/osmocom"
SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"
if [ ! -d $SUITE_DIR ]; then
echo "Directory '$SUITE_DIR' does not exist"
echo "Please specify where to find osmo-ttcn3-hacks"
exit 1
fi
tmux new-session -s $SESSION -n $SESSION -d
tmux split-window -t $SESSION:0 -v
tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/msc" C-m
tmux send-keys -t $SESSION:0.0 "osmo-msc -c osmo-msc.cfg" C-m
tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/msc" C-m
tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./MSC_Tests MSC_Tests.cfg"
tmux new-window -t $SESSION:1
tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/msc" C-m
tmux send-keys -t $SESSION:1.0 "osmo-stp -c osmo-stp.cfg" C-m
tmux attach -t $SESSION:0
Loading…
Cancel
Save