Add ttcn3-pcap-client-test

This runs pcap-client IUT against the TTCN3 ATS for pcap-client

Change-Id: Ie94106b1d1f348cd66f4b5304be6021dbaf732e1
changes/85/23885/1
Harald Welte 2 years ago
parent f32df20e12
commit 11591e496e
  1. 13
      ttcn3-pcap-client-test/Dockerfile
  2. 3
      ttcn3-pcap-client-test/Makefile
  3. 22
      ttcn3-pcap-client-test/OPCAP_CLIENT_Tests.cfg
  4. 38
      ttcn3-pcap-client-test/jenkins.sh
  5. 15
      ttcn3-pcap-client-test/osmo-pcap-client.cfg

@ -0,0 +1,13 @@
ARG REGISTRY
ARG USER
FROM $REGISTRY/$USER/debian-stretch-titan
ARG OSMO_TTCN3_BRANCH="master"
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" pcap-client
VOLUME /data
COPY OPCAP_CLIENT_Tests.cfg /data/OPCAP_CLIENT_Tests.cfg
CMD ttcn3-docker-run pcap-client OPCAP_CLIENT_Tests

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

@ -0,0 +1,22 @@
[ORDERED_INCLUDE]
"/osmo-ttcn3-hacks/Common.cfg"
"/osmo-ttcn3-hacks/pcap-client/OPCAP_CLIENT_Tests.default"
# Local configuration below
[LOGGING]
[TESTPORT_PARAMETERS]
*.VTY.CTRL_HOSTNAME := "172.18.31.20";
[MODULE_PARAMETERS]
OPCAP_CLIENT_Tests.mp_local_opcap_ip := "172.18.31.10";
OPCAP_CLIENT_Tests.mp_local_opcap_port := 5000;
OPCAP_CLIENT_Tests.mp_traffic_a := { "172.18.31.10", 44423 };
OPCAP_CLIENT_Tests.mp_traffic_b := { "172.18.31.20", 44442 };
[MAIN_CONTROLLER]
[EXECUTE]
OPCAP_CLIENT_Tests.control

@ -0,0 +1,38 @@
#!/bin/sh
. ../jenkins-common.sh
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
docker_images_require \
"osmo-pcap-$IMAGE_SUFFIX" \
"ttcn3-pcap-client-test"
set_clean_up_trap
set -e
mkdir $VOL_BASE_DIR/pcap-client-tester
cp OPCAP_CLIENT_Tests.cfg $VOL_BASE_DIR/pcap-client-tester/
mkdir $VOL_BASE_DIR/pcap-client
cp osmo-pcap-client.cfg $VOL_BASE_DIR/pcap-client/
SUBNET=31
network_create $SUBNET
echo Starting container with pcap-client
docker run --rm \
$(docker_network_params $SUBNET 20) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/pcap-client:/data \
--name ${BUILD_TAG}-pcap-client -d \
$DOCKER_ARGS \
$REPO_USER/osmo-pcap-$IMAGE_SUFFIX
echo Starting container with pcap-client testsuite
docker run --rm \
$(docker_network_params $SUBNET 10) \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/pcap-client-tester:/data \
--name ${BUILD_TAG}-ttcn3-pcap-client-test \
$DOCKER_ARGS \
$REPO_USER/ttcn3-pcap-client-test

@ -0,0 +1,15 @@
!
! OsmoPCAPClient (UNKNOWN-dirty) configuration saved from vty
!!
!
!
line vty
no login
bind 0.0.0.0
!
client
pcap device eth0
pcap filter udp port 44423
pcap detect-loop 0
server ip 172.18.31.10
server port 5000
Loading…
Cancel
Save