| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# this script executes m3ua-testtool against osmo-stp. It assumes that |
| 4 |
# it is called from within libosmo-sccp/contrib/test and also assumes |
| 5 |
# that adjacent to the libosmo-sccp, there's a check-out of |
| 6 |
# https://gitea.osmocom.org/nplab/m3ua-testtool |
| 7 |
|
| 8 |
# the top of the libosmo-sccp git repository |
| 9 |
TOPDIR=../../ |
| 10 |
|
| 11 |
# the directory in which we can find the osmo-stp binary |
| 12 |
STP_DIR=$TOPDIR/stp |
| 13 |
|
| 14 |
# the directory in which we can find the m3ua-testtool.git |
| 15 |
M3UA_DIR=$TOPDIR/../m3ua-testtool |
| 16 |
|
| 17 |
# osmo-stp config file, used from CWD |
| 18 |
STP_CONFIG=./osmo-stp.cfg |
| 19 |
|
| 20 |
# we're pesudo-root but inherit the path from a non-root user |
| 21 |
PATH=/sbin:/usr/sbin:$PATH |
| 22 |
|
| 23 |
# set up the ip addresses |
| 24 |
ip link set lo up |
| 25 |
ip addr add 172.18.0.2/32 dev lo |
| 26 |
ip addr add 172.18.0.200/32 dev lo |
| 27 |
|
| 28 |
$STP_DIR/osmo-stp -c $STP_CONFIG & |
| 29 |
STP_PID=$! |
| 30 |
(cd $M3UA_DIR && ./run-all-sgp-tests) |
| 31 |
kill $! |