aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-27 08:24:21 +0200
committerHarald Welte <laforge@gnumonks.org>2018-03-27 09:21:20 +0200
commit284a8816f2e7b7617a65abbff41bed6fa9073145 (patch)
tree86682e0a17ac956af848c7630d0a73182763190b
parentb0bc0c237e57c6ee9ad8bef0ba496af40109697d (diff)
add ttcn3-sip-test container
-rw-r--r--ttcn3-sip-test/.release2
-rw-r--r--ttcn3-sip-test/Dockerfile31
-rw-r--r--ttcn3-sip-test/Makefile1
-rw-r--r--ttcn3-sip-test/SIP_Tests.cfg20
-rwxr-xr-xttcn3-sip-test/jenkins.sh44
-rw-r--r--ttcn3-sip-test/osmo-sip-connector.cfg46
6 files changed, 144 insertions, 0 deletions
diff --git a/ttcn3-sip-test/.release b/ttcn3-sip-test/.release
new file mode 100644
index 0000000..b23db5c
--- /dev/null
+++ b/ttcn3-sip-test/.release
@@ -0,0 +1,2 @@
+release=0.0.0
+tag=ttcn3-sip-test-0.0.0
diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile
new file mode 100644
index 0000000..b03d494
--- /dev/null
+++ b/ttcn3-sip-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 sip
+
+VOLUME /data
+
+RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
+ ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
+
+COPY SIP_Tests.cfg /data/SIP_Tests.cfg
+
+CMD cd /data && \
+ /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sip/SIP_Tests && \
+ /osmo-ttcn3-hacks/log_merge.sh SIP_Tests --rm
diff --git a/ttcn3-sip-test/Makefile b/ttcn3-sip-test/Makefile
new file mode 100644
index 0000000..8d0e10b
--- /dev/null
+++ b/ttcn3-sip-test/Makefile
@@ -0,0 +1 @@
+include ../make/Makefile
diff --git a/ttcn3-sip-test/SIP_Tests.cfg b/ttcn3-sip-test/SIP_Tests.cfg
new file mode 100644
index 0000000..2904e76
--- /dev/null
+++ b/ttcn3-sip-test/SIP_Tests.cfg
@@ -0,0 +1,20 @@
+[ORDERED_INCLUDE]
+"/osmo-ttcn3-hacks/Common.cfg"
+"/osmo-ttcn3-hacks/sip/SIP_Tests.default"
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+*.SIPVTY.CTRL_HOSTNAME := "172.18.11.10"
+*.SIP.default_local_address := "172.18.11.103"
+*.SIP.default_dest_address := "172.18.11.10"
+
+[MODULE_PARAMETERS]
+SIP_Tests.mp_local_host := "172.18.11.103"
+SIP_Tests.mp_osmosip_host := "172.18.11.10"
+SIP_Tests.mp_mncc := "/data/unix/mncc"
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+SIP_Tests.control
diff --git a/ttcn3-sip-test/jenkins.sh b/ttcn3-sip-test/jenkins.sh
new file mode 100755
index 0000000..63e6c8a
--- /dev/null
+++ b/ttcn3-sip-test/jenkins.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+
+network_create 172.18.11.0/24
+
+mkdir $VOL_BASE_DIR/sip-tester
+mkdir $VOL_BASE_DIR/sip-tester/unix
+cp SIP_Tests.cfg $VOL_BASE_DIR/sip-tester/
+
+mkdir $VOL_BASE_DIR/sip
+mkdir $VOL_BASE_DIR/sip/unix
+cp osmo-sip-connector.cfg $VOL_BASE_DIR/sip/
+
+mkdir $VOL_BASE_DIR/unix
+
+echo Starting container with osmo-sip-connector
+docker run --rm \
+ --network $NET_NAME --ip 172.18.11.10 \
+ -v $VOL_BASE_DIR/sip:/data \
+ -v $VOL_BASE_DIR/unix:/data/unix \
+ --name ${BUILD_TAG}-sip-connector -d \
+ $REPO_USER/osmo-sip-master \
+ /usr/local/bin/osmo-sip-connector -M /data/unix/mncc
+
+echo Starting container with SIP testsuite
+docker run --rm \
+ --network $NET_NAME --ip 172.18.11.103 \
+ -e "TTCN3_PCAP_PATH=/data" \
+ -v $VOL_BASE_DIR/sip-tester:/data \
+ -v $VOL_BASE_DIR/unix:/data/unix \
+ --name ${BUILD_TAG}-ttcn3-sip-test \
+ $REPO_USER/ttcn3-sip-test
+
+echo Stopping containers
+docker container kill ${BUILD_TAG}-sip-connector
+
+network_remove
+
+rm -rf $WORKSPACE/logs
+mkdir -p $WORKSPACE/logs
+rm -rf $VOL_BASE_DIR/unix
+cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/
+cat $WORKSPACE/logs/sip-tester/junit-*.log || true
diff --git a/ttcn3-sip-test/osmo-sip-connector.cfg b/ttcn3-sip-test/osmo-sip-connector.cfg
new file mode 100644
index 0000000..db212ae
--- /dev/null
+++ b/ttcn3-sip-test/osmo-sip-connector.cfg
@@ -0,0 +1,46 @@
+!
+! OsmoMNCC (1.1.0-dirty) configuration saved from vty
+!!
+!
+log file /data/osmo-sip-connector.log
+ logging filter all 1
+ logging color 0
+ logging print category 1
+ logging timestamp 0
+ logging print file basename
+ logging level all everything
+ logging level sip debug
+ logging level mncc debug
+ logging level app debug
+ logging level call 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 notice
+ logging level ljibuf notice
+!
+stats interval 5
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+sip
+ local 172.18.11.10 5060
+ remote 172.18.11.103 5060
+mncc
+ socket-path /data/unix/mncc
+app