From bb39336e33be81165003fb3c62504f3535a12fc2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 22 Feb 2021 10:33:24 +0100 Subject: [PATCH] cbc: New ttcn3-cbc-test container Change-Id: I4386aeee8ba6d7aec7f879bad28208b7f27a45d9 --- ttcn3-cbc-test/CBC_Tests.cfg | 17 ++++++++++++ ttcn3-cbc-test/Dockerfile | 13 +++++++++ ttcn3-cbc-test/Makefile | 3 +++ ttcn3-cbc-test/jenkins.sh | 44 ++++++++++++++++++++++++++++++ ttcn3-cbc-test/osmo-cbc.cfg | 52 ++++++++++++++++++++++++++++++++++++ 5 files changed, 129 insertions(+) create mode 100644 ttcn3-cbc-test/CBC_Tests.cfg create mode 100644 ttcn3-cbc-test/Dockerfile create mode 100644 ttcn3-cbc-test/Makefile create mode 100755 ttcn3-cbc-test/jenkins.sh create mode 100644 ttcn3-cbc-test/osmo-cbc.cfg diff --git a/ttcn3-cbc-test/CBC_Tests.cfg b/ttcn3-cbc-test/CBC_Tests.cfg new file mode 100644 index 00000000..23607e26 --- /dev/null +++ b/ttcn3-cbc-test/CBC_Tests.cfg @@ -0,0 +1,17 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/cbc/CBC_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +CBC_Tests.mp_cbc_host := "172.18.27.20"; + +[MAIN_CONTROLLER] + +[EXECUTE] +CBC_Tests.control diff --git a/ttcn3-cbc-test/Dockerfile b/ttcn3-cbc-test/Dockerfile new file mode 100644 index 00000000..8eba25f6 --- /dev/null +++ b/ttcn3-cbc-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" cbc + +VOLUME /data + +COPY CBC_Tests.cfg /data/CBC_Tests.cfg + +CMD ttcn3-docker-run cbc CBC_Tests diff --git a/ttcn3-cbc-test/Makefile b/ttcn3-cbc-test/Makefile new file mode 100644 index 00000000..34897fd7 --- /dev/null +++ b/ttcn3-cbc-test/Makefile @@ -0,0 +1,3 @@ +RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.23.202 + +include ../make/Makefile diff --git a/ttcn3-cbc-test/jenkins.sh b/ttcn3-cbc-test/jenkins.sh new file mode 100755 index 00000000..40311fd3 --- /dev/null +++ b/ttcn3-cbc-test/jenkins.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "osmo-cbc-$IMAGE_SUFFIX" \ + "ttcn3-cbc-test" + +mkdir $VOL_BASE_DIR/cbc-tester +cp CBC_Tests.cfg $VOL_BASE_DIR/cbc-tester/ + +mkdir $VOL_BASE_DIR/stp +cp osmo-stp.cfg $VOL_BASE_DIR/stp/ + +mkdir $VOL_BASE_DIR/cbc +cp osmo-cbc.cfg $VOL_BASE_DIR/cbc/ + +SUBNET=27 +network_create $SUBNET + +echo Starting container with CBC +docker run --rm \ + $(docker_network_params $SUBNET 20) \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/cbc:/data \ + --name ${BUILD_TAG}-cbc -d \ + $DOCKER_ARGS \ + $REPO_USER/osmo-cbc-$IMAGE_SUFFIX + +echo Starting container with CBC testsuite +docker run --rm \ + $(docker_network_params $SUBNET 100) \ + --ulimit core=-1 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/cbc-tester:/data \ + --name ${BUILD_TAG}-ttcn3-cbc-test \ + $DOCKER_ARGS \ + $REPO_USER/ttcn3-cbc-test + +echo Stopping containers +docker container kill ${BUILD_TAG}-cbc + +network_remove +collect_logs diff --git a/ttcn3-cbc-test/osmo-cbc.cfg b/ttcn3-cbc-test/osmo-cbc.cfg new file mode 100644 index 00000000..3b6610eb --- /dev/null +++ b/ttcn3-cbc-test/osmo-cbc.cfg @@ -0,0 +1,52 @@ +! +! OsmoCBC (0.1.0.5-e88e) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category-hex 0 + logging print category 1 + logging print extended-timestamp 1 + logging print level 1 + logging print file 1 last + logging level cbsp debug + logging level rest debug + logging level lglobal info + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib notice + logging level lsms notice + logging level lctrl notice + logging level lgtp notice + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice + logging level lmgcp notice + logging level ljibuf notice + logging level lrspro notice + logging level lns notice + logging level lbssgp notice +! +line vty + no login + bind 0.0.0.0 +! +cbc + unknown-peers reject + peer ttcn3 + protocol cbsp + remote-port 9999 + remote-ip 172.18.27.100 + cbsp + local-ip 172.18.27.20 + local-port 48049 + ecbe + local-ip 172.18.27.20 + local-port 12345