Add ttcn3-hlr-test container

This commit is contained in:
Harald Welte 2018-03-01 15:09:36 +00:00
parent c8158f9349
commit a59c18da01
6 changed files with 106 additions and 0 deletions

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

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

31
ttcn3-hlr-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 && \
make deps-update hlr
#git cherry-pick 5ce5241d6d460e9b36a908ac7072d8ea68df08db && \
VOLUME /data
RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
COPY HLR_Tests.cfg /data/HLR_Tests.cfg
CMD cd /data && \
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/hlr/HLR_Tests && \
ttcn3_logmerge HLR*.log

View File

@ -0,0 +1,15 @@
[ORDERED_INCLUDE]
"/osmo-ttcn3-hacks/Common.cfg"
"/osmo-ttcn3-hacks/hlr/HLR_Tests.default"
[LOGGING]
[TESTPORT_PARAMETERS]
*.VTY.CTRL_HOSTNAME := "172.18.10.20"
[MODULE_PARAMETERS]
HLR_Tests.mp_hlr_ip := "172.18.10.20"
[MAIN_CONTROLLER]
[EXECUTE]

2
ttcn3-hlr-test/Makefile Normal file
View File

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

37
ttcn3-hlr-test/jenkins.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
. ../jenkins-common.sh
network_create 172.18.10.0/24
mkdir $VOL_BASE_DIR/hlr-tester
cp HLR_Tests.cfg $VOL_BASE_DIR/hlr-tester/
mkdir $VOL_BASE_DIR/hlr
cp osmo-hlr.cfg $VOL_BASE_DIR/hlr/
echo Starting container with HLR
docker run --rm \
--network $NET_NAME --ip 172.18.10.20 \
-v $VOL_BASE_DIR/hlr:/data \
--name ${BUILD_TAG}-hlr -d \
$REPO_USER/osmo-hlr-master \
/usr/local/bin/osmo-hlr
echo Starting container with HLR testsuite
docker run --rm \
--network $NET_NAME --ip 172.18.10.103 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/hlr-tester:/data \
--name ${BUILD_TAG}-ttcn3-hlr-test \
$REPO_USER/ttcn3-hlr-test
echo Stopping containers
docker container kill ${BUILD_TAG}-hlr
network_remove
rm -rf $WORKSPACE/logs
mkdir -p $WORKSPACE/logs
cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/
cat $WORKSPACE/logs/hlr-tester/junit-*.log || true

View File

@ -0,0 +1,19 @@
!
! OsmoHLR example configuration
!
log stderr
logging filter all 1
logging color 1
logging print category 1
logging timestamp 1
logging print extended-timestamp 1
logging level all debug
logging level linp error
!
line vty
bind 0.0.0.0
ctrl
bind 0.0.0.0
hlr
gsup
bind ip 0.0.0.0