diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-18 12:43:45 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-18 12:47:16 +0100 |
commit | 24829d6f78a65bae15b852c20ad3f845ee61f1c2 (patch) | |
tree | 5d239b9e02dcc48562064b1cc9ed77452720ca1e | |
parent | 406b02090aa131985cc34e55ef6b555bb41722a4 (diff) |
Add ttcn3-sgsn-test
-rw-r--r-- | ttcn3-sgsn-test/.release | 2 | ||||
-rw-r--r-- | ttcn3-sgsn-test/Dockerfile | 31 | ||||
-rw-r--r-- | ttcn3-sgsn-test/Makefile | 3 | ||||
-rw-r--r-- | ttcn3-sgsn-test/SGSN_Tests.cfg | 23 | ||||
-rwxr-xr-x | ttcn3-sgsn-test/jenkins.sh | 38 | ||||
-rw-r--r-- | ttcn3-sgsn-test/osmo-sgsn.cfg | 88 |
6 files changed, 185 insertions, 0 deletions
diff --git a/ttcn3-sgsn-test/.release b/ttcn3-sgsn-test/.release new file mode 100644 index 0000000..3cd7d65 --- /dev/null +++ b/ttcn3-sgsn-test/.release @@ -0,0 +1,2 @@ +release=0.0.0 +tag=ttcn3-sgsn-test-0.0.0 diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile new file mode 100644 index 0000000..b6267bd --- /dev/null +++ b/ttcn3-sgsn-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 && \ + git cherry-pick 5ce5241d6d460e9b36a908ac7072d8ea68df08db && \ + make sgsn + +VOLUME /data + +RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \ + ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh / + +COPY SGSN_Tests.cfg /data/SGSN_Tests.cfg + +CMD cd /data && \ + /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sgsn/SGSN_Tests && \ + ttcn3_logmerge SGSN*.log diff --git a/ttcn3-sgsn-test/Makefile b/ttcn3-sgsn-test/Makefile new file mode 100644 index 0000000..f96cf22 --- /dev/null +++ b/ttcn3-sgsn-test/Makefile @@ -0,0 +1,3 @@ +RUN_ARGS?=--rm --network sigtran --ip 172.19.1.202 -v sgsn-test-vol:/data + +include ../make/Makefile diff --git a/ttcn3-sgsn-test/SGSN_Tests.cfg b/ttcn3-sgsn-test/SGSN_Tests.cfg new file mode 100644 index 0000000..243ee9b --- /dev/null +++ b/ttcn3-sgsn-test/SGSN_Tests.cfg @@ -0,0 +1,23 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"/osmo-ttcn3-hacks/Common.cfg" +# testsuite specific configuration, not expected to change +"/osmo-ttcn3-hacks/sgsn/SGSN_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] +*.SGSNVTY.CTRL_HOSTNAME := "172.18.8.10" + +[MODULE_PARAMETERS] +NS_Emulation.mp_local_ip := "172.18.8.103" +NS_Emulation.mp_remote_ip := "172.18.8.10" +SGSN_Tests.mp_hlr_ip := "172.18.8.103" +SGSN_Tests.mp_ggsn_ip := "172.18.8.103" + + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/ttcn3-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh new file mode 100755 index 0000000..d9ccb45 --- /dev/null +++ b/ttcn3-sgsn-test/jenkins.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +. ../jenkins-common.sh + +network_create 172.18.8.0/24 + +mkdir $VOL_BASE_DIR/sgsn-tester +cp SGSN_Tests.cfg $VOL_BASE_DIR/sgsn-tester/ + +mkdir $VOL_BASE_DIR/sgsn +cp osmo-sgsn.cfg $VOL_BASE_DIR/sgsn/ + +mkdir $VOL_BASE_DIR/unix + +echo Starting container with SGSN +docker run --rm \ + --network $NET_NAME --ip 172.18.8.10 \ + -v $VOL_BASE_DIR/sgsn:/data \ + --name ${BUILD_TAG}-sgsn -d \ + $REPO_USER/osmo-sgsn-master \ + /usr/local/bin/osmo-sgsn + +echo Starting container with SGSN testsuite +docker run --rm \ + --network $NET_NAME --ip 172.18.8.103 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/sgsn-tester:/data \ + --name ${BUILD_TAG}-ttcn3-sgsn-test \ + $REPO_USER/ttcn3-sgsn-test + +echo Stopping containers +docker container kill ${BUILD_TAG}-sgsn + +network_remove + +rm -rf $WORKSPACE/logs +mkdir -p $WORKSPACE/logs +cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/ diff --git a/ttcn3-sgsn-test/osmo-sgsn.cfg b/ttcn3-sgsn-test/osmo-sgsn.cfg new file mode 100644 index 0000000..0999c51 --- /dev/null +++ b/ttcn3-sgsn-test/osmo-sgsn.cfg @@ -0,0 +1,88 @@ +! +! OsmoSGSN (1.2.0.46-e77e-dirty) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print file 1 + logging level all everything + logging level mm debug + logging level pag notice + logging level meas notice + logging level ref notice + logging level gprs debug + logging level ns info + logging level bssgp info + logging level llc debug + logging level sndcp debug + logging level slhc notice + logging level ranap info + logging level sua info + logging level v42bis info + 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 debug + logging level lstats notice + logging level lgsup debug + logging level loap notice + logging level lss7 notice + logging level lsccp info + logging level lsua notice + logging level lm3ua notice + logging level lmgcp notice +! +stats interval 5 +! +line vty + no login + bind 0.0.0.0 +ctrl + bind 0.0.0.0 +! +ns + timer tns-block 3 + timer tns-block-retries 3 + timer tns-reset 3 + timer tns-reset-retries 3 + timer tns-test 30 + timer tns-alive 3 + timer tns-alive-retries 10 + encapsulation udp local-ip 172.18.8.10 + encapsulation udp local-port 23000 + encapsulation framerelay-gre enabled 0 +bssgp +sgsn + gtp local-ip 172.18.8.10 + ggsn 0 remote-ip 172.18.8.103 + ggsn 0 gtp-version 1 + gsup remote-ip 172.18.8.103 + gsup remote-port 4222 + auth-policy remote + gsup oap-id 0 + ! apn * ggsn 0 + no cdr filename + no cdr trap + cdr interval 600 + timer t3312 600 + timer t3322 6 + timer t3350 6 + timer t3360 6 + timer t3370 6 + timer t3313 30 + timer t3314 44 + timer t3316 44 + timer t3385 8 + timer t3386 8 + timer t3395 8 + timer t3397 8 + no compression rfc1144 + no compression v42bis |