add ttcn3 sysinfo container

changes/84/7384/1
Harald Welte 6 years ago
parent 1d4fa1cf95
commit 9c937dd432
  1. 20
      ttcn3-nitb-sysinfo/Dockerfile
  2. 3
      ttcn3-nitb-sysinfo/Makefile
  3. 43
      ttcn3-nitb-sysinfo/Test.cfg
  4. 56
      ttcn3-nitb-sysinfo/jenkins.sh

@ -0,0 +1,20 @@
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
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch /tmp/commit
RUN cd osmo-ttcn3-hacks/sysinfo && \
git pull && \
./gen_links.sh && \
./regen_makefile.sh && \
make compile && \
make -j8
VOLUME /data
COPY Test.cfg /data/Test.cfg
CMD cd /data && \
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sysinfo/Test && \
ttcn3_logmerge Test*.log

@ -0,0 +1,3 @@
RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.0.230 -v ttcn3-nitb-sysinfo-vol:/data
include ../make/Makefile

@ -0,0 +1,43 @@
[LOGGING]
ConsoleMask := DEBUG | LOG_ALL | MATCHING | DEBUG_TESTPORT
LoggerPlugins := { JUnitLogger := "libjunitlogger2" }
*.JUnitLogger.testsuite_name := "osmo-ttcn3-hacks/sysinfo"
[MODULE_PARAMETERS]
[TESTPORT_PARAMETERS]
*.BSCVTY.CTRL_MODE := "client"
*.BSCVTY.CTRL_HOSTNAME := "172.18.0.20"
*.BSCVTY.CTRL_PORTNUM := "4242"
*.BSCVTY.CTRL_LOGIN_SKIPPED := "yes"
*.BSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
*.BSCVTY.CTRL_READMODE := "buffered"
*.BSCVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
*.BSCVTY.PROMPT1 := "OpenBSC> "
[MAIN_CONTROLLER]
[EXECUTE]
Test.TC_si1
Test.TC_telnet
Test.TC_si_default
Test.TC_si_sched_2bis
Test.TC_si_sched_2ter
Test.TC_si_sched_2ter_2bis
Test.TC_si_sched_2quater
Test.TC_si_sched_13
Test.TC_si_sched_13_2bis_2ter_2quater
Test.TC_neci
Test.TC_cell_resel_hyst
Test.TC_rxlev_acc_min
Test.TC_cellid
Test.TC_lac
Test.TC_rach_tx_int
Test.TC_rach_max_tx
Test.TC_attach
Test.TC_dtx_ul
Test.TC_emerg_allowed
Test.TC_bs_pa_mfrms
Test.TC_bs_ag_blks_res
Test.TC_radio_link_timeout

@ -0,0 +1,56 @@
#!/bin/sh
# non-jenkins execution: assume local user name
if [ "x$REPO_USER" = "x" ]; then
REPO_USER=$USER
fi
# non-jenkins execution: put logs in /tmp
if [ "x$WORKSPACE" = "x" ]; then
WORKSPACE=/tmp
fi
# start container with nitb in background
docker volume rm nitb-vol
docker run --rm \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--network sigtran --ip 172.18.0.20 \
-v nitb-vol:/data \
--name nitb -d \
$REPO_USER/osmo-nitb-master
# start container with bts in background
docker volume rm bts-vol
docker run --rm \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--network sigtran --ip 172.18.0.210 \
-v bts-vol:/data \
--name bts -d \
$REPO_USER/osmo-bts-master
# start docker container with testsuite in foreground
docker volume rm ttcn3-nitb-sysinfo-vol
docker run --rm \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--network sigtran --ip 172.18.0.230 \
-v ttcn3-nitb-sysinfo-vol:/data \
$REPO_USER/ttcn3-nitb-sysinfo
# stop bts + nitb after test has completed
docker container stop bts
docker container stop nitb
# start some stupid helper container so we can access the volume
docker run --rm \
-v ttcn3-nitb-sysinfo-vol:/ttcn3-nitb-sysinfo \
-v nitb-vol:/nitb \
-v bts-vol:/bts \
--name sysinfo-helper -d \
busybox /bin/sh -c 'sleep 1000 & wait'
rm -rf $WORKSPACE/logs
mkdir -p $WORKSPACE/logs
docker cp sysinfo-helper:/ttcn3-nitb-sysinfo $WORKSPACE/logs
docker cp sysinfo-helper:/nitb $WORKSPACE/logs
docker cp sysinfo-helper:/bts $WORKSPACE/logs
docker container stop -t 0 sysinfo-helper
Loading…
Cancel
Save