diff options
-rwxr-xr-x | ttcn3-hnbgw-test/jenkins.sh | 108 | ||||
-rw-r--r-- | ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg | 49 | ||||
-rw-r--r-- | ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg | 53 |
3 files changed, 165 insertions, 45 deletions
diff --git a/ttcn3-hnbgw-test/jenkins.sh b/ttcn3-hnbgw-test/jenkins.sh index 71a4dc6..83cca1f 100755 --- a/ttcn3-hnbgw-test/jenkins.sh +++ b/ttcn3-hnbgw-test/jenkins.sh @@ -10,53 +10,71 @@ docker_images_require \ set_clean_up_trap set -e -mkdir $VOL_BASE_DIR/hnbgw-tester -mkdir $VOL_BASE_DIR/hnbgw-tester/unix -cp HNBGW_Tests.cfg $VOL_BASE_DIR/hnbgw-tester/ -write_mp_osmo_repo "$VOL_BASE_DIR/hnbgw-tester/HNBGW_Tests.cfg" +SUBNET=35 +network_create $SUBNET -mkdir $VOL_BASE_DIR/stp -cp osmo-stp.cfg $VOL_BASE_DIR/stp/ +run_tests() { + base_dir="$1" + tests_cfg="$2" + stp_cfg="$3" + hnbgw_cfg="$4" -mkdir $VOL_BASE_DIR/hnbgw -mkdir $VOL_BASE_DIR/hnbgw/unix -cp osmo-hnbgw.cfg $VOL_BASE_DIR/hnbgw/ + mkdir $base_dir/hnbgw-tester + mkdir $base_dir/hnbgw-tester/unix + cp "$tests_cfg" $base_dir/hnbgw-tester/ + write_mp_osmo_repo "$base_dir/hnbgw-tester/HNBGW_Tests.cfg" -mkdir $VOL_BASE_DIR/unix + mkdir $base_dir/stp + cp "$stp_cfg" $base_dir/stp/ -SUBNET=35 -network_create $SUBNET + mkdir $base_dir/hnbgw + mkdir $base_dir/hnbgw/unix + cp "$hnbgw_cfg" $base_dir/hnbgw/ + + mkdir $base_dir/unix + + echo Starting container with STP + docker run --rm \ + $(docker_network_params $SUBNET 200) \ + --ulimit core=-1 \ + -v $base_dir/stp:/data \ + --name ${BUILD_TAG}-stp -d \ + $DOCKER_ARGS \ + $REPO_USER/osmo-stp-$IMAGE_SUFFIX + + echo Starting container with HNBGW + docker run --rm \ + $(docker_network_params $SUBNET 20) \ + --ulimit core=-1 \ + -v $base_dir/hnbgw:/data \ + -v $base_dir/unix:/data/unix \ + --name ${BUILD_TAG}-hnbgw -d \ + $DOCKER_ARGS \ + $REPO_USER/osmo-hnbgw-$IMAGE_SUFFIX + + echo Starting container with HNBGW testsuite + docker run --rm \ + $(docker_network_params $SUBNET 203) \ + --ulimit core=-1 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $base_dir/hnbgw-tester:/data \ + -v $base_dir/unix:/data/unix \ + --name ${BUILD_TAG}-ttcn3-hnbgw-test \ + $DOCKER_ARGS \ + $REPO_USER/ttcn3-hnbgw-test + + echo Stopping containers + docker container kill ${BUILD_TAG}-hnbgw + docker container kill ${BUILD_TAG}-stp +} + +echo Testing without PFCP +run_tests "$VOL_BASE_DIR" "HNBGW_Tests.cfg" "osmo-stp.cfg" "osmo-hnbgw.cfg" -echo Starting container with STP -docker run --rm \ - $(docker_network_params $SUBNET 200) \ - --ulimit core=-1 \ - -v $VOL_BASE_DIR/stp:/data \ - --name ${BUILD_TAG}-stp -d \ - $DOCKER_ARGS \ - $REPO_USER/osmo-stp-$IMAGE_SUFFIX - -echo Starting container with HNBGW -docker run --rm \ - $(docker_network_params $SUBNET 20) \ - --ulimit core=-1 \ - -v $VOL_BASE_DIR/hnbgw:/data \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-hnbgw -d \ - $DOCKER_ARGS \ - $REPO_USER/osmo-hnbgw-$IMAGE_SUFFIX - -echo Starting container with HNBGW testsuite -docker run --rm \ - $(docker_network_params $SUBNET 203) \ - --ulimit core=-1 \ - -e "TTCN3_PCAP_PATH=/data" \ - -v $VOL_BASE_DIR/hnbgw-tester:/data \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-ttcn3-hnbgw-test \ - $DOCKER_ARGS \ - $REPO_USER/ttcn3-hnbgw-test - -echo Stopping containers -docker container kill ${BUILD_TAG}-hnbgw -docker container kill ${BUILD_TAG}-stp +echo Testing with PFCP +VOL_BASE_DIR_PFCP="$VOL_BASE_DIR/with-pfcp" +mkdir "$VOL_BASE_DIR_PFCP" +run_tests "$VOL_BASE_DIR_PFCP" "with-pfcp/HNBGW_Tests.cfg" "osmo-stp.cfg" "with-pfcp/osmo-hnbgw.cfg" +# Make jenkins results show ':with-pfcp': append ':with-pfcp' to the jenkins results classnames +sed -i "s/classname='\([^']\+\)'/classname='\1:with-pfcp'/g" \ + $VOL_BASE_DIR_PFCP/hnbgw-tester/junit-xml-*.log diff --git a/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg b/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg new file mode 100644 index 0000000..d3ea553 --- /dev/null +++ b/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg @@ -0,0 +1,49 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"/osmo-ttcn3-hacks/Common.cfg" +# testsuite specific configuration, not expected to change +"/osmo-ttcn3-hacks/hnbgw/HNBGW_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] +*.HNBGWVTY.CTRL_HOSTNAME := "172.18.35.20" + +[MODULE_PARAMETERS] +HNBGW_Tests.mp_hnodeb_ip := "172.18.35.203"; +HNBGW_Tests.mp_hnbgw_ip := "172.18.35.20"; +HNBGW_Tests.mp_mgw_ip := "172.18.35.203"; +HNBGW_Tests.mp_msc_cfg := { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23905, "172.18.35.203", 2905, "172.18.35.200" }, + own_pc := 188, /* 0.23.4 first MSC emulation */ + own_ssn := 142, + peer_pc := 189, /* 0.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 1 +}; +HNBGW_Tests.mp_sgsn_cfg := { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23906, "172.18.35.203", 2905, "172.18.35.200" }, + own_pc := 185, /* 0.23.1 first SGSN emulation */ + own_ssn := 142, + peer_pc := 189, /* 0.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 2 +}; + +HNBGW_Tests.mp_enable_pfcp_tests := true; +HNBGW_Tests.mp_pfcp_ip_local := "172.18.35.203"; +HNBGW_Tests.mp_pfcp_ip_remote := "172.18.35.20"; + + +[MAIN_CONTROLLER] + +[EXECUTE] +HNBGW_Tests.control diff --git a/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg b/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg new file mode 100644 index 0000000..ce8e673 --- /dev/null +++ b/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg @@ -0,0 +1,53 @@ +! +! OsmoHNBGW (1.1.0) configuration saved from vty +!! +! +log gsmtap 172.18.35.203 + logging level set-all debug + logging filter all 1 +! +log stderr + logging filter all 1 + logging color 1 + logging print category-hex 1 + logging print category 1 + logging print thread-id 0 + logging print extended-timestamp 1 + logging print file 1 + logging level set-all debug +! +line vty + no login + bind 0.0.0.0 +! +cs7 instance 0 + asp asp-clnt-msc-0 2905 2905 m3ua + local-ip 172.18.35.20 + remote-ip 172.18.35.200 + point-code 0.23.5 + sccp-address msc + routing-indicator PC + point-code 0.23.4 + sccp-address sgsn + routing-indicator PC + point-code 0.23.1 +hnbgw + log-prefix hnb-id + iuh + local-ip 172.18.35.20 + local-port 29169 + hnbap-allow-tmsi 1 + iucs + remote-addr msc + iups + remote-addr sgsn + mgcp + mgw local-ip 172.18.35.20 + mgw remote-ip 172.18.35.203 + pfcp + remote-addr 172.18.35.203 + local-addr 172.18.35.20 + # so far HNBGW_Tests.ttcn does not heed the port an Assoc Setup Req came from, it always responds to port 8805 + local-port 8805 + # send PFCP Assoc Setup Req more often + timer pfcp x26 5 |