add ttcn3-smlc-test

Change-Id: I6ab09224a41796fed4023ba1ef1ff99f37863875
This commit is contained in:
Neels Hofmeyr 2020-09-21 17:02:51 +00:00
parent 72ddd58f07
commit 71b3157420
6 changed files with 195 additions and 0 deletions

View File

@ -0,0 +1,35 @@
ARG USER
FROM $USER/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 $OSMO_TTCN3_BRANCH && \
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make bsc
VOLUME /data
RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
COPY BSC_Tests.cfg /data/BSC_Tests.cfg
CMD cd /data && \
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc/BSC_Tests; \
exit_code=$?; \
/osmo-ttcn3-hacks/log_merge.sh BSC_Tests --rm; \
exit $exit_code

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

@ -0,0 +1,3 @@
RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.23.202
include ../make/Makefile

View File

@ -0,0 +1,31 @@
[ORDERED_INCLUDE]
"/osmo-ttcn3-hacks/Common.cfg"
"/osmo-ttcn3-hacks/smlc/SMLC_Tests.default"
[LOGGING]
*.JUnitLogger.testsuite_name := "SMLC_Tests"
[TESTPORT_PARAMETERS]
*.SMLCVTY.CTRL_HOSTNAME := "172.18.23.20"
*.STATSVTY.CTRL_HOSTNAME := "172.18.23.20"
[MODULE_PARAMETERS]
SMLC_Tests.mp_smlc_ip := "172.18.23.20";
SMLC_Tests.mp_test_ip := "172.18.23.203";
SMLC_Tests.mp_bssap_le_cfg := {
{
sccp_service_type := "mtp3_itu",
sctp_addr := { 23905, "172.18.23.203", 2905, "172.18.23.200" },
own_pc := 187, /* 0.23.3 first BSC emulation */
own_ssn := 250, /* BSC side SSN */
peer_pc := 190, /* 0.23.6 osmo-smlc */
peer_ssn := 252, /* SMLC side SSN */
sio := '83'O,
rctx := 1
}
};
[MAIN_CONTROLLER]
[EXECUTE]
SMLC_Tests.control

56
ttcn3-smlc-test/jenkins.sh Executable file
View File

@ -0,0 +1,56 @@
#!/bin/sh
. ../jenkins-common.sh
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
docker_images_require \
"osmo-stp-$IMAGE_SUFFIX" \
"osmo-smlc-$IMAGE_SUFFIX" \
"ttcn3-smlc-test"
mkdir $VOL_BASE_DIR/smlc-tester
cp SMLC_Tests.cfg $VOL_BASE_DIR/smlc-tester/
mkdir $VOL_BASE_DIR/stp
cp osmo-stp.cfg $VOL_BASE_DIR/stp/
mkdir $VOL_BASE_DIR/smlc
cp osmo-smlc.cfg $VOL_BASE_DIR/smlc/
SUBNET=23
network_create $SUBNET
echo Starting container with STP
docker run --rm \
$(docker_network_params $SUBNET 200) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp -d \
--ulimit core=-1 \
$DOCKER_ARGS \
$REPO_USER/osmo-stp-$IMAGE_SUFFIX
echo Starting container with SMLC
docker run --rm \
$(docker_network_params $SUBNET 20) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/smlc:/data \
--name ${BUILD_TAG}-smlc -d \
$DOCKER_ARGS \
$REPO_USER/osmo-smlc-$IMAGE_SUFFIX
echo Starting container with SMLC testsuite
docker run --rm \
$(docker_network_params $SUBNET 203) \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/smlc-tester:/data \
--name ${BUILD_TAG}-ttcn3-smlc-test \
$DOCKER_ARGS \
$REPO_USER/ttcn3-smlc-test
echo Stopping containers
docker container kill ${BUILD_TAG}-smlc
docker container kill ${BUILD_TAG}-stp
network_remove
collect_logs

View File

@ -0,0 +1,28 @@
log gsmtap 172.18.23.203
logging level set-all debug
logging filter all 1
log stderr
logging filter all 1
logging color 1
logging print level 1
logging print category 1
logging print category-hex 0
logging print extended-timestamp 1
logging print file basename last
logging level set-all debug
line vty
no login
bind 0.0.0.0
cs7 instance 0
asp asp-clnt-msc-0 2905 2905 m3ua
local-ip 172.18.23.20
local-ip fd02:db8:23::20
remote-ip 172.18.23.200
remote-ip fd02:db8:23::200
cells
lac-ci 23 42 lat 23.23 lon 42.42
cgi 001 02 3 4 lat 5.678 lon 6.789
cgi 001 02 1 17 lat 7.890123 lon 8.90123

View File

@ -0,0 +1,42 @@
!
! OsmoSTP (0.8.1) configuration saved from vty
!!
!
log gsmtap 172.18.23.203
logging level set-all debug
logging filter all 1
!
log stderr
logging filter all 1
logging color 1
logging print level 1
logging print category 1
logging print category-hex 0
logging print extended-timestamp 1
logging print file basename last
logging level set-all notice
logging level lss7 debug
logging level lsccp debug
logging level lsua debug
logging level lm3ua debug
!
line vty
no login
!
cs7 instance 0
xua rkm routing-key-allocation dynamic-permitted
asp virt-bsc0-0 23905 2905 m3ua
local-ip 172.18.23.200
local-ip fd02:db8:23::200
remote-ip 172.18.23.203
remote-ip fd02:db8:23::203
as virt-bsc0 m3ua
asp virt-bsc0-0
routing-key 1 0.23.3
route-table system
update route 0.23.3 7.255.7 linkset virt-bsc0
listen m3ua 2905
accept-asp-connections dynamic-permitted
local-ip 172.18.23.200
local-ip fd02:db8:23::200