add ttcn3-sip-test container

Change-Id: Ibfe2a2b47c266788d51e98d64bca7017caf19e29
This commit is contained in:
Harald Welte 2018-03-27 08:24:21 +02:00
parent b0bc0c237e
commit 284a8816f2
6 changed files with 144 additions and 0 deletions

2
ttcn3-sip-test/.release Normal file
View File

@ -0,0 +1,2 @@
release=0.0.0
tag=ttcn3-sip-test-0.0.0

31
ttcn3-sip-test/Dockerfile Normal file
View File

@ -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

1
ttcn3-sip-test/Makefile Normal file
View File

@ -0,0 +1 @@
include ../make/Makefile

View File

@ -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

44
ttcn3-sip-test/jenkins.sh Executable file
View File

@ -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

View File

@ -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