aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-04-08 21:40:19 +0000
committerNeels Hofmeyr <neels@hofmeyr.de>2021-04-16 13:38:24 +0000
commit46964a4e1b1663e16467d199110d3753c7b129c7 (patch)
tree1428ccd0d0a016c4f639a321aab3e5ec7a4ba2d9
parenta2aa5e39cac13b3b332f2c2214ed9e544ae7782f (diff)
fu
-rwxr-xr-xttcn3-bsc-test-vamos/jenkins.sh33
1 files changed, 30 insertions, 3 deletions
diff --git a/ttcn3-bsc-test-vamos/jenkins.sh b/ttcn3-bsc-test-vamos/jenkins.sh
index 6462977..197bac3 100755
--- a/ttcn3-bsc-test-vamos/jenkins.sh
+++ b/ttcn3-bsc-test-vamos/jenkins.sh
@@ -11,6 +11,25 @@ docker_images_require \
set_clean_up_trap
set -e
+ADD_TTCN_RUN_OPTS=""
+ADD_TTCN_RUN_CMD=""
+ADD_TTCN_VOLUMES=""
+ADD_BSC_VOLUMES=""
+ADD_BSC_ARGS=""
+
+if [ "x$1" = "x-h" ]; then
+ ADD_TTCN_RUN_OPTS="-ti"
+ ADD_TTCN_RUN_CMD="bash"
+ if [ -d "$2" ]; then
+ ADD_TTCN_VOLUMES="$ADD_TTCN_VOLUMES -v $2:/osmo-ttcn3-hacks"
+ fi
+ if [ -d "$3" ]; then
+ ADD_BSC_RUN_CMD="sleep 9999999"
+ ADD_BSC_VOLUMES="$ADD_BSC_VOLUMES -v $3:/src"
+ #ADD_BSC_RUN_OPTS="--privileged"
+ fi
+fi
+
mkdir $VOL_BASE_DIR/bsc-tester
cp BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/
@@ -34,15 +53,20 @@ docker run --rm \
--ulimit core=-1 \
$DOCKER_ARGS \
$REPO_USER/osmo-stp-$IMAGE_SUFFIX
+ #\
+ #sleep 9999999
echo Starting container with BSC
docker run --rm \
$(docker_network_params $SUBNET 20) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/bsc:/data \
+ $ADD_BSC_VOLUMES \
--name ${BUILD_TAG}-bsc -d \
$DOCKER_ARGS \
- $REPO_USER/osmo-bsc-$IMAGE_SUFFIX
+ $ADD_BSC_RUN_OPTS \
+ $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \
+ $ADD_BSC_RUN_CMD
for i in `seq 0 2`; do
echo Starting container with OML for BTS$i
@@ -53,7 +77,7 @@ 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 -f VAMOS 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 -f VAMOS 172.18.31.20 $((i + 1234)) 1" # " >>/data/osmo-bts-omldummy-${i}.log 2>&1"
done
echo Starting container with BSC testsuite
@@ -62,6 +86,9 @@ docker run --rm \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/bsc-tester:/data \
+ $ADD_TTCN_VOLUMES \
--name ${BUILD_TAG}-ttcn3-bsc-test \
$DOCKER_ARGS \
- $REPO_USER/ttcn3-bsc-test
+ $ADD_TTCN_RUN_OPTS \
+ $REPO_USER/ttcn3-bsc-test \
+ $ADD_TTCN_RUN_CMD