diff options
Diffstat (limited to 'ttcn3-mgw-test')
-rw-r--r-- | ttcn3-mgw-test/.release | 2 | ||||
-rw-r--r-- | ttcn3-mgw-test/Dockerfile | 27 | ||||
-rw-r--r-- | ttcn3-mgw-test/MGCP_Test.cfg | 16 | ||||
-rw-r--r-- | ttcn3-mgw-test/Makefile | 1 | ||||
-rwxr-xr-x | ttcn3-mgw-test/jenkins.sh | 37 | ||||
-rw-r--r-- | ttcn3-mgw-test/osmo-mgw.cfg | 52 |
6 files changed, 135 insertions, 0 deletions
diff --git a/ttcn3-mgw-test/.release b/ttcn3-mgw-test/.release new file mode 100644 index 0000000..1e59c25 --- /dev/null +++ b/ttcn3-mgw-test/.release @@ -0,0 +1,2 @@ +release=0.1.0 +tag=ttcn3-mgw-test-0.1.0 diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile new file mode 100644 index 0000000..423e9df --- /dev/null +++ b/ttcn3-mgw-test/Dockerfile @@ -0,0 +1,27 @@ +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 + +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 mgw + +VOLUME /data + +RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \ + ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh / + +COPY MGCP_Test.cfg /data/MGCP_Test.cfg + +CMD cd /data && \ + /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/mgw/MGCP_Test && \ + /osmo-ttcn3-hacks/log_merge.sh MGCP_Test --rm diff --git a/ttcn3-mgw-test/MGCP_Test.cfg b/ttcn3-mgw-test/MGCP_Test.cfg new file mode 100644 index 0000000..cd23183 --- /dev/null +++ b/ttcn3-mgw-test/MGCP_Test.cfg @@ -0,0 +1,16 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/mgw/MGCP_Test.default" + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +mp_local_ip:= "172.18.4.181"; +mp_remote_ip:= "172.18.4.180"; + +[MAIN_CONTROLLER] + +[EXECUTE] +MGCP_Test.control diff --git a/ttcn3-mgw-test/Makefile b/ttcn3-mgw-test/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/ttcn3-mgw-test/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/ttcn3-mgw-test/jenkins.sh b/ttcn3-mgw-test/jenkins.sh new file mode 100755 index 0000000..755ce9b --- /dev/null +++ b/ttcn3-mgw-test/jenkins.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +. ../jenkins-common.sh + +VOL_BASE_DIR=`mktemp -d` +mkdir $VOL_BASE_DIR/mgw-tester +cp MGCP_Test.cfg $VOL_BASE_DIR/mgw-tester/ + +mkdir $VOL_BASE_DIR/mgw +cp osmo-mgw.cfg $VOL_BASE_DIR/mgw/ + +network_create 172.18.4.0/24 + +# start container with mgw in background +docker run --rm \ + --network $NET_NAME --ip 172.18.4.180 \ + -v $VOL_BASE_DIR/mgw:/data \ + --name ${BUILD_TAG}-mgw -d \ + $REPO_USER/osmo-mgw-master + +# start docker container with testsuite in foreground +docker run --rm \ + --network $NET_NAME --ip 172.18.4.181 \ + -v $VOL_BASE_DIR/mgw-tester:/data \ + -e "TTCN3_PCAP_PATH=/data" \ + --name ${BUILD_TAG}-ttcn3-mgw-test \ + $REPO_USER/ttcn3-mgw-test + +# stop mgw after test has completed +docker container stop ${BUILD_TAG}-mgw + +network_remove + +rm -rf $WORKSPACE/logs +mkdir -p $WORKSPACE/logs +cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/ +cat $WORKSPACE/logs/mgw-tester/junit-*.log || true diff --git a/ttcn3-mgw-test/osmo-mgw.cfg b/ttcn3-mgw-test/osmo-mgw.cfg new file mode 100644 index 0000000..acf7e31 --- /dev/null +++ b/ttcn3-mgw-test/osmo-mgw.cfg @@ -0,0 +1,52 @@ +! +! OsmoMGW (1.2.0.17-52e3) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 0 + logging level all everything + logging level rtp notice + logging level lglobal notice + 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 debug +! +stats interval 5 +! +line vty + no login +! +mgcp + bind ip 172.18.4.180 + bind port 2427 + rtp port-range 4002 16000 + rtp bind-ip 172.18.4.180 + rtp ip-probing + rtp ip-dscp 184 + no rtp keep-alive + no rtcp-omit + no rtp-patch + sdp audio-payload number 98 + sdp audio-payload name GSM + sdp audio-payload send-ptime + sdp audio-payload send-name + loop 0 + number endpoints 31 + allow-transcoding + osmux off |