blob: 4d05d072b9c6b7982c3138006f5faf27b856b64d [file] [log] [blame]
Vadim Yanitskiy3414a482021-12-09 21:42:58 +03001#!/bin/sh
2
3SESSION="ttcn3-bts-test"
4
5OSMO_DIR="/home/$USER/osmocom"
6OBB_DIR="$OSMO_DIR/osmocom-bb"
7SUITE_DIR="$OSMO_DIR/osmo-ttcn3-hacks"
8RESPAWN="$OSMO_DIR/scripts/respawn.sh"
9
10if [ ! -d $SUITE_DIR ]; then
11 echo "Directory '$SUITE_DIR' does not exist"
12 echo "Please specify where to find osmo-ttcn3-hacks"
13 exit 1
14fi
15
16if [ ! -d $OBB_DIR ]; then
17 echo "Directory '$OBB_DIR' does not exist"
18 echo "Please specify where to find osmocom-bb"
19 exit 1
20fi
21
22if [ ! -f $RESPAWN ]; then
23 echo "Script '$RESPAWN' does not exist"
24 echo "Please specify where to find respawn.sh"
25 exit 1
26fi
27
28tmux new-session -s $SESSION -n $SESSION -d
29
30tmux split-window -t $SESSION:0 -v
31tmux send-keys -t $SESSION:0.0 "cd $SUITE_DIR/bts" C-m
32tmux send-keys -t $SESSION:0.0 "$RESPAWN osmo-bts-trx -c osmo-bts.cfg"
33tmux send-keys -t $SESSION:0.1 "cd $SUITE_DIR/bts" C-m
34tmux send-keys -t $SESSION:0.1 "../start-testsuite.sh ./BTS_Tests BTS_Tests.cfg"
35
36
37tmux new-window -t $SESSION:1
38tmux split-window -t $SESSION:1 -v
39tmux split-window -t $SESSION:1 -v
40
41# Start osmo-bsc
42tmux send-keys -t $SESSION:1.0 "cd $SUITE_DIR/bts" C-m
43tmux send-keys -t $SESSION:1.0 "osmo-bsc -c osmo-bsc.cfg" C-m
44# Start trxcon
45tmux send-keys -t $SESSION:1.1 "cd $OBB_DIR/src/host/trxcon" C-m
46tmux send-keys -t $SESSION:1.1 "./trxcon -s /tmp/osmocom_l2" C-m
47# Start fake_trx.py
48tmux send-keys -t $SESSION:1.2 "cd $OBB_DIR/src/target/trx_toolkit" C-m
Vadim Yanitskiy1b68dbc2022-03-11 14:21:30 +030049tmux send-keys -t $SESSION:1.2 "./fake_trx.py"
50tmux send-keys -t $SESSION:1.2 " --trx TRX1@127.0.0.1:5700/1"
51tmux send-keys -t $SESSION:1.2 " --trx TRX2@127.0.0.1:5700/2"
52tmux send-keys -t $SESSION:1.2 " --trx TRX3@127.0.0.1:5700/3"
53tmux send-keys -t $SESSION:1.2 C-m
Vadim Yanitskiy3414a482021-12-09 21:42:58 +030054
55tmux attach -t $SESSION:0