aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-28 21:27:09 +0200
committerpespin <pespin@sysmocom.de>2021-11-24 22:22:29 +0000
commitb7c430dd10500ba3c6094a91bf9401740b879386 (patch)
treeb278b3a141b4fc67223eb309f284be9829dd1f9d
parentdcf499203d49cee4474087da22657fe62f1ffb3d (diff)
Introduce Docker image for ttcn-hnodeb-testHEADmaster
-rw-r--r--ttcn3-hnodeb-test/Dockerfile13
-rw-r--r--ttcn3-hnodeb-test/HNB_Tests.cfg19
-rw-r--r--ttcn3-hnodeb-test/Makefile3
-rwxr-xr-xttcn3-hnodeb-test/jenkins.sh41
-rw-r--r--ttcn3-hnodeb-test/osmo-hnodeb.cfg25
5 files changed, 101 insertions, 0 deletions
diff --git a/ttcn3-hnodeb-test/Dockerfile b/ttcn3-hnodeb-test/Dockerfile
new file mode 100644
index 0000000..9659dd1
--- /dev/null
+++ b/ttcn3-hnodeb-test/Dockerfile
@@ -0,0 +1,13 @@
+ARG REGISTRY
+ARG USER
+FROM $REGISTRY/$USER/debian-stretch-titan
+ARG OSMO_TTCN3_BRANCH="master"
+
+ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
+RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" hnodeb
+
+VOLUME /data
+
+COPY HNB_Tests.cfg /data/HNB_Tests.cfg
+
+CMD ttcn3-docker-run hnodeb HNB_Tests
diff --git a/ttcn3-hnodeb-test/HNB_Tests.cfg b/ttcn3-hnodeb-test/HNB_Tests.cfg
new file mode 100644
index 0000000..9190e1b
--- /dev/null
+++ b/ttcn3-hnodeb-test/HNB_Tests.cfg
@@ -0,0 +1,19 @@
+[ORDERED_INCLUDE]
+"/osmo-ttcn3-hacks/Common.cfg"
+"/osmo-ttcn3-hacks/hnodeb/HNB_Tests.default"
+
+[LOGGING]
+*.JUnitLogger.testsuite_name := "HNB_Tests"
+
+[TESTPORT_PARAMETERS]
+*.HNBVTY.CTRL_HOSTNAME := "172.18.33.20";
+*.STATSVTY.CTRL_HOSTNAME := "172.18.33.20";
+
+[MODULE_PARAMETERS]
+HNB_Tests.mp_hnodeb_ip := "172.18.33.20";
+HNB_Tests.mp_hnbgw_iuh_ip := "172.18.33.203";
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+HNB_Tests.control
diff --git a/ttcn3-hnodeb-test/Makefile b/ttcn3-hnodeb-test/Makefile
new file mode 100644
index 0000000..ce2919e
--- /dev/null
+++ b/ttcn3-hnodeb-test/Makefile
@@ -0,0 +1,3 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.33.202 -v ggsn-test-vol:/data
+
+include ../make/Makefile
diff --git a/ttcn3-hnodeb-test/jenkins.sh b/ttcn3-hnodeb-test/jenkins.sh
new file mode 100755
index 0000000..6ffa98a
--- /dev/null
+++ b/ttcn3-hnodeb-test/jenkins.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+ "osmo-hnodeb-$IMAGE_SUFFIX" \
+ "ttcn3-hnodeb-test"
+
+set_clean_up_trap
+set -e
+
+mkdir $VOL_BASE_DIR/hnodeb-tester
+cp HNB_Tests.cfg $VOL_BASE_DIR/hnodeb-tester/
+
+mkdir $VOL_BASE_DIR/hnodeb
+cp osmo-hnodeb.cfg $VOL_BASE_DIR/hnodeb/
+
+SUBNET=33
+network_create $SUBNET
+
+echo Starting container with HNodeB
+docker run --rm \
+ $(docker_network_params $SUBNET 20) \
+ --ulimit core=-1 \
+ -v $VOL_BASE_DIR/hnodeb:/data \
+ --name ${BUILD_TAG}-hnodeb -d \
+ $DOCKER_ARGS \
+ $REPO_USER/osmo-hnodeb-$IMAGE_SUFFIX
+
+echo Starting container with HNodeB testsuite
+docker run --rm \
+ $(docker_network_params $SUBNET 203) \
+ --ulimit core=-1 \
+ -e "TTCN3_PCAP_PATH=/data" \
+ -v $VOL_BASE_DIR/hnodeb-tester:/data \
+ --name ${BUILD_TAG}-ttcn3-hnodeb-test \
+ $DOCKER_ARGS \
+ $REPO_USER/ttcn3-hnodeb-test
+
+echo Stopping containers
+docker container kill ${BUILD_TAG}-hnodeb
diff --git a/ttcn3-hnodeb-test/osmo-hnodeb.cfg b/ttcn3-hnodeb-test/osmo-hnodeb.cfg
new file mode 100644
index 0000000..e3925e8
--- /dev/null
+++ b/ttcn3-hnodeb-test/osmo-hnodeb.cfg
@@ -0,0 +1,25 @@
+!
+log gsmtap 172.18.33.203
+ logging level set-all debug
+ logging filter all 1
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 1
+ logging print extended-timestamp 1
+ logging level set-all debug
+!
+line vty
+ no login
+ bind 172.18.33.20
+!
+hnodeb
+ cell_identity 1
+ location_area_code 2
+ routing_area_code 3
+ service_area_code 4
+ iuh
+ local-ip 172.18.33.20
+ remote-ip 172.18.33.203