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