diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-01 15:09:36 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-01 16:22:21 +0000 |
commit | a59c18da015f4f341e92be312e6762fd1347f537 (patch) | |
tree | b3da63f17c1a6da693586c2d7c8b8d17c23988de /ttcn3-hlr-test | |
parent | c8158f93493ca3ddac657e33741e2351a8fc9bcb (diff) |
Add ttcn3-hlr-test container
Diffstat (limited to 'ttcn3-hlr-test')
-rw-r--r-- | ttcn3-hlr-test/.release | 2 | ||||
-rw-r--r-- | ttcn3-hlr-test/Dockerfile | 31 | ||||
-rw-r--r-- | ttcn3-hlr-test/HLR_Tests.cfg | 15 | ||||
-rw-r--r-- | ttcn3-hlr-test/Makefile | 2 | ||||
-rwxr-xr-x | ttcn3-hlr-test/jenkins.sh | 37 | ||||
-rw-r--r-- | ttcn3-hlr-test/osmo-hlr.cfg | 19 |
6 files changed, 106 insertions, 0 deletions
diff --git a/ttcn3-hlr-test/.release b/ttcn3-hlr-test/.release new file mode 100644 index 0000000..2b8e341 --- /dev/null +++ b/ttcn3-hlr-test/.release @@ -0,0 +1,2 @@ +release=0.0.0 +tag=ttcn3-hlr-test-0.0.0 diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile new file mode 100644 index 0000000..1f56c15 --- /dev/null +++ b/ttcn3-hlr-test/Dockerfile @@ -0,0 +1,31 @@ +FROM laforge/debian-stretch-titan + +RUN mkdir /root/projects && (cd /root/projects && ln -sf / git) +RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git + +RUN cd osmo-ttcn3-hacks && \ + git checkout -f -B master origin/master && \ + make deps + +RUN git config --global user.email docker@dock.er && \ + git config --global user.name "Dock Er" + +ARG OSMO_TTCN3_BRANCH="master" + +ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit +RUN cd osmo-ttcn3-hacks && \ + git fetch && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + make deps-update hlr + #git cherry-pick 5ce5241d6d460e9b36a908ac7072d8ea68df08db && \ + +VOLUME /data + +RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \ + ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh / + +COPY HLR_Tests.cfg /data/HLR_Tests.cfg + +CMD cd /data && \ + /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/hlr/HLR_Tests && \ + ttcn3_logmerge HLR*.log diff --git a/ttcn3-hlr-test/HLR_Tests.cfg b/ttcn3-hlr-test/HLR_Tests.cfg new file mode 100644 index 0000000..e97d3c8 --- /dev/null +++ b/ttcn3-hlr-test/HLR_Tests.cfg @@ -0,0 +1,15 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/hlr/HLR_Tests.default" + +[LOGGING] + +[TESTPORT_PARAMETERS] +*.VTY.CTRL_HOSTNAME := "172.18.10.20" + +[MODULE_PARAMETERS] +HLR_Tests.mp_hlr_ip := "172.18.10.20" + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/ttcn3-hlr-test/Makefile b/ttcn3-hlr-test/Makefile new file mode 100644 index 0000000..0895788 --- /dev/null +++ b/ttcn3-hlr-test/Makefile @@ -0,0 +1,2 @@ + +include ../make/Makefile diff --git a/ttcn3-hlr-test/jenkins.sh b/ttcn3-hlr-test/jenkins.sh new file mode 100755 index 0000000..7cd74ae --- /dev/null +++ b/ttcn3-hlr-test/jenkins.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +. ../jenkins-common.sh + +network_create 172.18.10.0/24 + +mkdir $VOL_BASE_DIR/hlr-tester +cp HLR_Tests.cfg $VOL_BASE_DIR/hlr-tester/ + +mkdir $VOL_BASE_DIR/hlr +cp osmo-hlr.cfg $VOL_BASE_DIR/hlr/ + +echo Starting container with HLR +docker run --rm \ + --network $NET_NAME --ip 172.18.10.20 \ + -v $VOL_BASE_DIR/hlr:/data \ + --name ${BUILD_TAG}-hlr -d \ + $REPO_USER/osmo-hlr-master \ + /usr/local/bin/osmo-hlr + +echo Starting container with HLR testsuite +docker run --rm \ + --network $NET_NAME --ip 172.18.10.103 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/hlr-tester:/data \ + --name ${BUILD_TAG}-ttcn3-hlr-test \ + $REPO_USER/ttcn3-hlr-test + +echo Stopping containers +docker container kill ${BUILD_TAG}-hlr + +network_remove + +rm -rf $WORKSPACE/logs +mkdir -p $WORKSPACE/logs +cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/ +cat $WORKSPACE/logs/hlr-tester/junit-*.log || true diff --git a/ttcn3-hlr-test/osmo-hlr.cfg b/ttcn3-hlr-test/osmo-hlr.cfg new file mode 100644 index 0000000..71a76c8 --- /dev/null +++ b/ttcn3-hlr-test/osmo-hlr.cfg @@ -0,0 +1,19 @@ +! +! OsmoHLR example configuration +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level all debug + logging level linp error +! +line vty + bind 0.0.0.0 +ctrl + bind 0.0.0.0 +hlr + gsup + bind ip 0.0.0.0 |