aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-12-22 13:01:42 +0100
committerosmith <osmith@sysmocom.de>2023-01-16 11:41:11 +0000
commit4cb0fac1b0e18b8036cea66225681160561f422d (patch)
treec9bf6118b8e2a078da20b6ba72e34041c99a38e5
parentea90e44ab05e0b332a7754f5c776c1144754aa82 (diff)
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
-rwxr-xr-xttcn3-bsc-test-vamos/jenkins.sh8
-rwxr-xr-xttcn3-bsc-test/jenkins-sccplite.sh8
-rwxr-xr-xttcn3-bsc-test/jenkins.sh8
-rwxr-xr-xttcn3-bts-test/jenkins.sh15
-rwxr-xr-xttcn3-pcu-test/jenkins-sns.sh6
-rwxr-xr-xttcn3-remsim-test/jenkins.sh5
-rwxr-xr-xttcn3-sccp-test/jenkins.sh6
7 files changed, 45 insertions, 11 deletions
diff --git a/ttcn3-bsc-test-vamos/jenkins.sh b/ttcn3-bsc-test-vamos/jenkins.sh
index e686710..3f7f1ec 100755
--- a/ttcn3-bsc-test-vamos/jenkins.sh
+++ b/ttcn3-bsc-test-vamos/jenkins.sh
@@ -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
diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh b/ttcn3-bsc-test/jenkins-sccplite.sh
index e402b33..6dac56a 100755
--- a/ttcn3-bsc-test/jenkins-sccplite.sh
+++ b/ttcn3-bsc-test/jenkins-sccplite.sh
@@ -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
diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh
index c018046..2138169 100755
--- a/ttcn3-bsc-test/jenkins.sh
+++ b/ttcn3-bsc-test/jenkins.sh
@@ -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
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index 3438771..3f1f2f1 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -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() {
diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh
index 4bd2480..dfcf403 100755
--- a/ttcn3-pcu-test/jenkins-sns.sh
+++ b/ttcn3-pcu-test/jenkins-sns.sh
@@ -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 \
diff --git a/ttcn3-remsim-test/jenkins.sh b/ttcn3-remsim-test/jenkins.sh
index 2a6a9d8..b9e74b4 100755
--- a/ttcn3-remsim-test/jenkins.sh
+++ b/ttcn3-remsim-test/jenkins.sh
@@ -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() {
diff --git a/ttcn3-sccp-test/jenkins.sh b/ttcn3-sccp-test/jenkins.sh
index d1a9a11..3a3346a 100755
--- a/ttcn3-sccp-test/jenkins.sh
+++ b/ttcn3-sccp-test/jenkins.sh
@@ -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