Add ttcn3-sgsn-test

This commit is contained in:
Harald Welte 2018-02-18 12:43:45 +01:00
parent 406b02090a
commit 24829d6f78
6 changed files with 185 additions and 0 deletions

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

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

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

3
ttcn3-sgsn-test/Makefile Normal file
View File

@ -0,0 +1,3 @@
RUN_ARGS?=--rm --network sigtran --ip 172.19.1.202 -v sgsn-test-vol:/data
include ../make/Makefile

View File

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

38
ttcn3-sgsn-test/jenkins.sh Executable file
View File

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

View File

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