Introduce ttcn-sccp dockerized setup
Since examples/sccp_demo_user (the binary used to test SCCP) is not installed by libosmo-sccp.git during make install, we need to install it manually after "make" step, and hence it's only available in osmo-stp-master, because in osmo-stp-latest we used packaged files. Related: OS#4343 Depends: osmo-ttcn3-hacks.git Ied9fbfb9bd35a99205ca13db033dd9ea03d51238 Change-Id: I5a7e6ff5f6e5f6e34d6a5ab29bd760a6f9d49c4b
This commit is contained in:
parent
fd77c845df
commit
b2f417d9a8
|
@ -32,6 +32,7 @@ RUN cd libosmo-sccp && \
|
|||
autoreconf -fi && \
|
||||
./configure && \
|
||||
make -j8 install && \
|
||||
install examples/sccp_demo_user /usr/local/bin/ && \
|
||||
ldconfig
|
||||
|
||||
VOLUME /data
|
||||
|
|
|
@ -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 sccp
|
||||
|
||||
VOLUME /data
|
||||
|
||||
RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
|
||||
ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
|
||||
|
||||
COPY SCCP_Tests.cfg /data/SCCP_Tests.cfg
|
||||
|
||||
CMD cd /data && \
|
||||
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sccp/SCCP_Tests; \
|
||||
exit_code=$?; \
|
||||
/osmo-ttcn3-hacks/log_merge.sh SCCP_Tests --rm; \
|
||||
exit $exit_code
|
|
@ -0,0 +1,3 @@
|
|||
RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data
|
||||
|
||||
include ../make/Makefile
|
|
@ -0,0 +1,30 @@
|
|||
[ORDERED_INCLUDE]
|
||||
"/osmo-ttcn3-hacks/Common.cfg"
|
||||
"/osmo-ttcn3-hacks/sccp/SCCP_Tests.default"
|
||||
|
||||
[LOGGING]
|
||||
*.JUnitLogger.testsuite_name := "SCCP_Tests"
|
||||
|
||||
[TESTPORT_PARAMETERS]
|
||||
*.SCCP_DEMO_USER_VTY.CTRL_HOSTNAME := "172.18.22.200"
|
||||
*.SCCP_DEMO_USER_VTY.CTRL_PORTNUM := "2324"
|
||||
|
||||
[MODULE_PARAMETERS]
|
||||
SCCP_Tests.mp_sccp_cfg := {
|
||||
{
|
||||
sccp_service_type := "mtp3_itu",
|
||||
sctp_addr := { 2905, "172.18.22.203", 2905, "172.18.22.200" },
|
||||
own_pc := 23,
|
||||
own_ssn := 202, /* sscp_test_server.c: SSN_TEST_ECHO */
|
||||
peer_pc := 1,
|
||||
peer_ssn := 202, /* sscp_test_server.c: SSN_TEST_ECHO */
|
||||
sio := '03'O, /* NI=Internal, SCCP */
|
||||
rctx := 0
|
||||
}
|
||||
};
|
||||
|
||||
[MAIN_CONTROLLER]
|
||||
|
||||
[EXECUTE]
|
||||
SCCP_Tests.control
|
||||
SCCP_Tests_RAW.control
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ../jenkins-common.sh
|
||||
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
|
||||
# Always require osmo-stp-master since is the only with sccp_demo_user installed
|
||||
docker_images_require \
|
||||
"debian-stretch-build" \
|
||||
"osmo-stp-master" \
|
||||
"debian-stretch-titan" \
|
||||
"ttcn3-sccp-test"
|
||||
|
||||
mkdir $VOL_BASE_DIR/sccp-tester
|
||||
cp SCCP_Tests.cfg $VOL_BASE_DIR/sccp-tester/
|
||||
|
||||
mkdir $VOL_BASE_DIR/sccp
|
||||
#cp osmo-sccp.cfg $VOL_BASE_DIR/sccp/
|
||||
|
||||
network_create 172.18.22.0/24
|
||||
|
||||
echo Starting container with sccp_demo_user
|
||||
docker run --rm \
|
||||
--network $NET_NAME --ip 172.18.22.200 \
|
||||
-v $VOL_BASE_DIR/sccp:/data \
|
||||
--name ${BUILD_TAG}-stp -d \
|
||||
$REPO_USER/osmo-stp-master \
|
||||
/bin/sh -c "sccp_demo_user -l 172.18.22.200 -r 172.18.22.203 >>/data/sccp_demo_user.log 2>&1"
|
||||
|
||||
|
||||
echo Starting container with SCCP testsuite
|
||||
docker run --rm \
|
||||
--network $NET_NAME --ip 172.18.22.203 \
|
||||
-e "TTCN3_PCAP_PATH=/data" \
|
||||
-v $VOL_BASE_DIR/sccp-tester:/data \
|
||||
--name ${BUILD_TAG}-ttcn3-sccp-test \
|
||||
$REPO_USER/ttcn3-sccp-test
|
||||
|
||||
docker container kill ${BUILD_TAG}-stp
|
||||
|
||||
network_remove
|
||||
collect_logs
|
Loading…
Reference in New Issue