ttcn3-*/jenkins*.sh: use $SUBNET everywhere

Use the SUBNET variable instead of hardcoding it in some places. Split
commands across multiple lines while at it to improve readability.

Related: OS#5802
Change-Id: I08f83089ef97f5f92d4bbfa5743301e7375e9f0f
changes/69/30769/2
Oliver Smith 2022-12-22 13:01:42 +01:00 committed by osmith
parent ea90e44ab0
commit 4cb0fac1b0
7 changed files with 45 additions and 11 deletions

View File

@ -60,7 +60,13 @@ for i in `seq 0 2`; do
--name ${BUILD_TAG}-bts$i -d \
$DOCKER_ARGS \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
/bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy $BTS_FEATURES 172.18.31.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1"
/bin/sh -c "/usr/local/bin/respawn.sh \
osmo-bts-omldummy \
$BTS_FEATURES \
172.18.$SUBNET.20 \
$((i + 1234)) \
1 \
>>/data/osmo-bts-omldummy-${i}.log 2>&1"
done
echo Starting container with BSC testsuite

View File

@ -51,7 +51,13 @@ for i in "0 1" "1 1" "2 4"; do
--name ${BUILD_TAG}-bts$1 -d \
$DOCKER_ARGS \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
/bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy $BTS_FEATURES 172.18.12.20 $(($1 + 1234)) $2 >>/data/osmo-bts-omldummy-$1.log 2>&1"
/bin/sh -c "/usr/local/bin/respawn.sh \
osmo-bts-omldummy \
$BTS_FEATURES \
172.18.$SUBNET.20 \
$(($1 + 1234)) \
$2 \
>>/data/osmo-bts-omldummy-$1.log 2>&1"
done
echo Starting container with BSC testsuite

View File

@ -60,7 +60,13 @@ for i in "0 1" "1 1" "2 4"; do
--name ${BUILD_TAG}-bts$1 -d \
$DOCKER_ARGS \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
/bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy $BTS_FEATURES 172.18.2.20 $(($1 + 1234)) $2 >>/data/osmo-bts-omldummy-$1.log 2>&1"
/bin/sh -c "/usr/local/bin/respawn.sh \
osmo-bts-omldummy \
$BTS_FEATURES \
172.18.$SUBNET.20 \
$(($1 + 1234)) \
$2 \
>>/data/osmo-bts-omldummy-$1.log 2>&1"
done
echo Starting container with BSC testsuite

View File

@ -68,10 +68,12 @@ start_fake_trx() {
--log-file-level DEBUG \
--log-file-time \
--log-level INFO \
-R 172.18.9.20 -r 172.18.9.22 \
--trx TRX1@172.18.9.20:5700/1 \
--trx TRX2@172.18.9.20:5700/2 \
--trx TRX3@172.18.9.20:5700/3 >>/data/fake_trx.out 2>&1"
-R 172.18.$SUBNET.20 \
-r 172.18.$SUBNET.22 \
--trx TRX1@172.18.$SUBNET.20:5700/1 \
--trx TRX2@172.18.$SUBNET.20:5700/2 \
--trx TRX3@172.18.$SUBNET.20:5700/3 \
>>/data/fake_trx.out 2>&1"
}
start_trxcon() {
@ -84,7 +86,10 @@ start_trxcon() {
--name ${BUILD_TAG}-trxcon -d \
$DOCKER_ARGS \
$REPO_USER/osmocom-bb-host-master \
/bin/sh -c "trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 >>/data/trxcon.log 2>&1"
/bin/sh -c "trxcon \
-i 172.18.$SUBNET.21 \
-s /data/unix/osmocom_l2 \
>>/data/trxcon.log 2>&1"
}
start_virtphy() {

View File

@ -32,7 +32,11 @@ docker run --rm \
--name ${BUILD_TAG}-pcu-sns -d \
$DOCKER_ARGS \
$REPO_USER/osmo-pcu-$IMAGE_SUFFIX \
/bin/sh -c "/usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.14.10 >>/data/osmo-pcu.log 2>&1"
/bin/sh -c "/usr/local/bin/respawn.sh \
osmo-pcu \
-c /data/osmo-pcu.cfg \
-i 172.18.$SUBNET.10 \
>>/data/osmo-pcu.log 2>&1"
echo Starting container with PCU testsuite
docker run --rm \

View File

@ -30,7 +30,10 @@ start_bankd() {
--name ${BUILD_TAG}-bankd -d \
$DOCKER_ARGS \
$REPO_USER/osmo-remsim-$IMAGE_SUFFIX \
/bin/sh -c "pcscd; osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1"
/bin/sh -c "pcscd; \
osmo-remsim-bankd \
-i 172.18.$SUBNET.10 \
>/data/osmo-remsim-bankd.log 2>&1"
}
start_client() {

View File

@ -28,7 +28,11 @@ docker run --rm \
--name ${BUILD_TAG}-stp -d \
$DOCKER_ARGS \
$REPO_USER/osmo-stp-master \
/bin/sh -c "sccp_demo_user -l 172.18.22.200 -r 172.18.22.203 -C /data/sccp_demo_user.cfg >>/data/sccp_demo_user.log 2>&1"
/bin/sh -c "sccp_demo_user \
-l 172.18.$SUBNET.200 \
-r 172.18.$SUBNET.203 \
-C /data/sccp_demo_user.cfg \
>>/data/sccp_demo_user.log 2>&1"
echo Starting container with SCCP testsuite