Add osmo-bts-test + dependencies

This commit is contained in:
Harald Welte 2018-03-01 14:05:15 +00:00
parent e707891fa8
commit c0da6a0e7a
13 changed files with 485 additions and 0 deletions

View File

@ -22,6 +22,8 @@ RUN apt-get update && \
libgtp-dev && \
apt-get clean
ADD respawn.sh /usr/local/bin/respawn.sh
WORKDIR /tmp
RUN git clone git://git.osmocom.org/osmo-bts.git

9
osmo-bts-master/respawn.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
trap "kill 0" EXIT
while [ -e /etc/passwd ]; do
$* &
LAST_PID=$!
wait $LAST_PID
done

View File

@ -0,0 +1,2 @@
release=0.0.0
tag=osmocombb-bb-trxcon-0.0.0

View File

@ -0,0 +1,46 @@
FROM laforge/debian-jessie-build
MAINTAINER Harald Welte <laforge@gnumonks.org>
ARG OSMO_BB_BRANCH="laforge/trx"
ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/"
COPY Release.key /tmp/Release.key
RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list
ADD $OSMOCOM_REPO/Release /tmp/Release
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
tcpdump \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev && \
apt-get clean
WORKDIR /tmp
RUN git clone git://git.osmocom.org/osmocom-bb.git
ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit
RUN cd osmocom-bb && \
git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH
RUN cd osmocom-bb/src/host/trxcon && \
autoreconf -fi && \
./configure && \
make -j8 install
RUN mkdir -p /data/unix
VOLUME /data
WORKDIR /data
#CMD ["/usr/local/sbin/virtphy","-s","/data/osmocom_l2"]

View File

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

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

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

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

View File

@ -0,0 +1,18 @@
[ORDERED_INCLUDE]
"/osmo-ttcn3-hacks/Common.cfg"
"/osmo-ttcn3-hacks/bts/BTS_Tests.default"
[LOGGING]
[TESTPORT_PARAMETERS]
*.BTSVTY.CTRL_HOSTNAME := "172.18.9.20"
[MODULE_PARAMETERS]
BTS_Tests.mp_rsl_ip := "172.18.9.10"
BTS_Tests.mp_bb_trxc_ip := "172.18.9.21"
BTS_Tests.mp_pcu_socket := "/data/unix/pcu_sock"
L1CTL_PortType.m_l1ctl_sock_path := "/data/unix/osmocom_l2"
[MAIN_CONTROLLER]
[EXECUTE]

31
ttcn3-bts-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 bts
#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 BTS_Tests.cfg /data/BTS_Tests.cfg
CMD cd /data && \
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bts/BTS_Tests && \
ttcn3_logmerge BTS*.log

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

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

74
ttcn3-bts-test/jenkins.sh Executable file
View File

@ -0,0 +1,74 @@
#!/bin/sh
. ../jenkins-common.sh
network_create 172.18.9.0/24
mkdir $VOL_BASE_DIR/bts-tester
mkdir $VOL_BASE_DIR/bts-tester/unix
cp BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/
mkdir $VOL_BASE_DIR/bsc
cp osmo-bsc.cfg $VOL_BASE_DIR/bsc/
mkdir $VOL_BASE_DIR/bts
mkdir $VOL_BASE_DIR/bts/unix
cp osmo-bts.cfg $VOL_BASE_DIR/bts/
mkdir $VOL_BASE_DIR/unix
echo Starting container with BSC
docker run --rm \
--network $NET_NAME --ip 172.18.9.11 \
-v $VOL_BASE_DIR/bsc:/data \
--name ${BUILD_TAG}-bsc -d \
$REPO_USER/osmo-bsc-master \
/usr/local/bin/osmo-bsc -c /data/osmo-bsc.cfg
echo Starting container with BTS
docker run --rm \
--network $NET_NAME --ip 172.18.9.20 \
-v $VOL_BASE_DIR/bts:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-bts -d \
$REPO_USER/osmo-bts-master \
/usr/local/bin/respawn.sh /usr/local/bin/osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10
echo Starting container with fake_trx
docker run --rm \
--network $NET_NAME --ip 172.18.9.21 \
--name ${BUILD_TAG}-fake_trx -d \
$REPO_USER/osmocom-bb-trxcon \
/tmp/osmocom-bb/src/target/fake_trx/fake_trx.py -R 172.18.9.20 -r 172.18.9.22
echo Starting container with trxcon
docker run --rm \
--network $NET_NAME --ip 172.18.9.22 \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-trxcon -d \
$REPO_USER/osmocom-bb-trxcon \
/usr/local/bin/trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2
echo Starting container with BTS testsuite
docker run --rm \
--network $NET_NAME --ip 172.18.9.10 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/bts-tester:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-ttcn3-bts-test \
$REPO_USER/ttcn3-bts-test
echo Stopping containers
docker container kill ${BUILD_TAG}-trxcon
docker container kill ${BUILD_TAG}-fake_trx
docker container kill ${BUILD_TAG}-bts
docker container kill ${BUILD_TAG}-bsc
network_remove
rm -rf $WORKSPACE/logs
mkdir -p $WORKSPACE/logs
rm -rf $VOL_BASE_DIR/unix
cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/
cat $WORKSPACE/logs/bts-tester/junit-*.log || true

196
ttcn3-bts-test/osmo-bsc.cfg Normal file
View File

@ -0,0 +1,196 @@
!
! OsmoBSC (1.1.2.236-5f22) configuration saved from vty
!!
password foo
!
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 rll info
logging level cc notice
logging level mm notice
logging level rr notice
logging level rsl debug
logging level nm notice
logging level pag notice
logging level meas notice
logging level msc debug
logging level mgcp notice
logging level ho notice
logging level hodec notice
logging level ref notice
logging level nat notice
logging level ctrl notice
logging level filter debug
logging level pcu debug
logging level lglobal notice
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 info
logging level lgtp notice
logging level lstats notice
logging level lgsup notice
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
!
e1_input
e1_line 0 driver ipa
e1_line 0 port 0
no e1_line 0 keepalive
ipa bind 0.0.0.0
cs7 instance 0
point-code 0.23.3
asp asp-clnt-msc-0 2905 0 m3ua
as as-clnt-msc-0 m3ua
asp asp-clnt-msc-0
routing-key 2 0.23.3
network
network country code 1
mobile network code 1
encryption a5 0
neci 1
paging any use tch 0
handover 0
handover1 window rxlev averaging 10
handover1 window rxqual averaging 1
handover1 window rxlev neighbor averaging 10
handover1 power budget interval 6
handover1 power budget hysteresis 3
handover1 maximum distance 9999
dyn_ts_allow_tch_f 1
periodic location update 30
bts 0
type sysmobts
band DCS1800
cell_identity 0
location_area_code 1
dtx uplink force
dtx downlink
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
radio-link-timeout 32
channel allocator ascending
rach tx integer 9
rach max transmission 7
channel-descrption attach 1
channel-descrption bs-pa-mfrms 5
channel-descrption bs-ag-blks-res 1
early-classmark-sending forbidden
early-classmark-sending-3g allowed
ip.access unit_id 1234 0
ip.access rsl-ip 172.18.9.10
oml ip.access stream_id 255 line 0
neighbor-list mode manual-si5
neighbor-list add arfcn 100
neighbor-list add arfcn 200
si5 neighbor-list add arfcn 10
si5 neighbor-list add arfcn 20
codec-support fr
gprs mode gprs
gprs 11bit_rach_support_for_egprs 0
gprs routing area 0
gprs network-control-order nc0
gprs cell bvci 1234
gprs cell timer blocking-timer 3
gprs cell timer blocking-retries 3
gprs cell timer unblocking-retries 3
gprs cell timer reset-timer 3
gprs cell timer reset-retries 3
gprs cell timer suspend-timer 10
gprs cell timer suspend-retries 3
gprs cell timer resume-timer 10
gprs cell timer resume-retries 3
gprs cell timer capability-update-timer 10
gprs cell timer capability-update-retries 3
gprs nsei 1234
gprs ns timer tns-block 3
gprs ns timer tns-block-retries 3
gprs ns timer tns-reset 3
gprs ns timer tns-reset-retries 3
gprs ns timer tns-test 30
gprs ns timer tns-alive 3
gprs ns timer tns-alive-retries 10
gprs nsvc 0 nsvci 1234
gprs nsvc 0 local udp port 23000
gprs nsvc 0 remote udp port 23000
gprs nsvc 0 remote ip 192.168.100.239
gprs nsvc 1 nsvci 0
gprs nsvc 1 local udp port 0
gprs nsvc 1 remote udp port 0
gprs nsvc 1 remote ip 0.0.0.0
no force-combined-si
trx 0
rf_locked 0
arfcn 871
nominal power 23
max_power_red 20
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
hopping enabled 0
timeslot 1
phys_chan_config TCH/F
hopping enabled 0
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
timeslot 5
phys_chan_config TCH/H
hopping enabled 0
timeslot 6
phys_chan_config SDCCH8
hopping enabled 0
timeslot 7
phys_chan_config PDCH
hopping enabled 0
msc 0
core-location-area-code 666
core-cell-identity 333
ip.access rtp-base 4000
timeout-ping 12
timeout-pong 14
no timeout-ping advanced
no bsc-welcome-text
no bsc-msc-lost-text
no bsc-grace-text
codec-list fr1 fr2 fr3
dest 192.168.100.11 6666 0
type normal
allow-emergency allow
amr-config 12_2k forbidden
amr-config 10_2k forbidden
amr-config 7_95k forbidden
amr-config 7_40k forbidden
amr-config 6_70k forbidden
amr-config 5_90k allowed
amr-config 5_15k forbidden
amr-config 4_75k forbidden
bsc
mid-call-timeout 0
no missing-msc-text
access-list-name bsc-list

View File

@ -0,0 +1,81 @@
!
! OsmoBTS (0.4.0.446-e0fb) configuration saved from vty
!!
!
log stderr
logging filter all 1
logging color 1
logging print category 1
logging timestamp 1
logging level rsl info
logging level oml info
logging level rll notice
logging level rr notice
logging level meas info
logging level pag info
logging level l1c info
logging level l1p notice
logging level dsp info
logging level pcu debug
logging level ho notice
logging level trx info
logging level loop notice
logging level abis notice
logging level rtp notice
logging level sum notice
logging level lglobal notice
logging level llapd notice
logging level linp notice
logging level lmux notice
logging level lmi notice
logging level lmib debug
logging level lsms notice
logging level lctrl notice
logging level lgtp notice
logging level lstats notice
logging level lgsup notice
logging level loap notice
logging level lss7 notice
logging level lsccp notice
logging level lsua notice
logging level lm3ua notice
!
line vty
no login
bind 0.0.0.0
!
e1_input
e1_line 0 driver ipa
e1_line 0 port 0
no e1_line 0 keepalive
phy 0
osmotrx ip local 172.18.9.20
osmotrx ip remote 172.18.9.21
osmotrx fn-advance 20
osmotrx rts-advance 5
instance 0
osmotrx rx-gain 10
osmotrx tx-attenuation 0
bts 0
band DCS1800
ipa unit-id 1234 0
oml remote-ip 172.18.9.11
rtp jitter-buffer 100
paging queue-size 200
paging lifetime 0
uplink-power-target -75
gsmtap-sapi agch
gsmtap-sapi bcch
gsmtap-sapi pch
gsmtap-sapi sdcch
gsmtap-sapi sacch
min-qual-rach 50
min-qual-norm -5
!settsc
pcu-socket /data/unix/pcu_sock
trx 0
power-ramp max-initial 0 mdBm
power-ramp step-size 2000 mdB
power-ramp step-interval 1
ms-power-control dsp
phy 0 instance 0