diff options
author | Oliver Smith <osmith@sysmocom.de> | 2018-10-12 16:36:08 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2018-10-26 10:19:05 +0200 |
commit | 96a0c5f73afce09eca1a1407ecd7799b3fd2634b (patch) | |
tree | 5ee8a1e2ae78c00afe1f7f73a9a964c2dbf43afc /nplab-m3ua-test | |
parent | 53a447251715323668d95ae690612ac1f4bb15b8 (diff) |
rename m3ua-test, sua-test to nplab-*-test
Allows writing a generic Jenkins Job Builder config by renaming the
container folders to match the job names. This needs changes in the
Jenkins jobs, as done in Ie433925ee81a61c5788b4a6f2bc5b89c2689d251.
Related: OS#3268
Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
Diffstat (limited to 'nplab-m3ua-test')
-rw-r--r-- | nplab-m3ua-test/.release | 2 | ||||
-rw-r--r-- | nplab-m3ua-test/Dockerfile | 20 | ||||
-rw-r--r-- | nplab-m3ua-test/Makefile | 3 | ||||
-rwxr-xr-x | nplab-m3ua-test/all-sgp-tests.txt | 32 | ||||
-rw-r--r-- | nplab-m3ua-test/dotguile | 35 | ||||
-rwxr-xr-x | nplab-m3ua-test/jenkins.sh | 37 | ||||
-rw-r--r-- | nplab-m3ua-test/m3ua-param-testtool.scm | 136 | ||||
-rw-r--r-- | nplab-m3ua-test/osmo-stp.cfg | 71 |
8 files changed, 336 insertions, 0 deletions
diff --git a/nplab-m3ua-test/.release b/nplab-m3ua-test/.release new file mode 100644 index 0000000..d5685f1 --- /dev/null +++ b/nplab-m3ua-test/.release @@ -0,0 +1,2 @@ +release=0.1.0 +tag=m3ua-test-0.1.0 diff --git a/nplab-m3ua-test/Dockerfile b/nplab-m3ua-test/Dockerfile new file mode 100644 index 0000000..ba5d17d --- /dev/null +++ b/nplab-m3ua-test/Dockerfile @@ -0,0 +1,20 @@ +ARG USER=osmocom-build +FROM $USER/sigtran-tests + +MAINTAINER Harald Welte <laforge@gnumonks.org> + +RUN cd /tmp && git clone git://git.osmocom.org/nplab/m3ua-testtool +ADD http://git.osmocom.org/nplab/m3ua-testtool/patch /tmp/commit +RUN cd /tmp/m3ua-testtool && \ + git pull && \ + cp runtest-junitxml.py /usr/local/bin/ + +COPY dotguile /root/.guile + +RUN mkdir /data + +VOLUME /data + +COPY m3ua-param-testtool.scm all-sgp-tests.txt /data/ + +CMD /usr/local/bin/runtest-junitxml.py -s 0.1 -t 10 -d /root /data/all-sgp-tests.txt diff --git a/nplab-m3ua-test/Makefile b/nplab-m3ua-test/Makefile new file mode 100644 index 0000000..0631fd3 --- /dev/null +++ b/nplab-m3ua-test/Makefile @@ -0,0 +1,3 @@ +RUN_ARGS?=--rm --network sigtran --ip 172.18.7.2 + +include ../make/Makefile diff --git a/nplab-m3ua-test/all-sgp-tests.txt b/nplab-m3ua-test/all-sgp-tests.txt new file mode 100755 index 0000000..e46dedc --- /dev/null +++ b/nplab-m3ua-test/all-sgp-tests.txt @@ -0,0 +1,32 @@ +m3ua-sgp-aspsm-v-001 +m3ua-sgp-aspsm-v-003 +m3ua-sgp-aspsm-v-005 +m3ua-sgp-aspsm-i-001 +m3ua-sgp-aspsm-i-002 +m3ua-sgp-aspsm-i-003 +m3ua-sgp-aspsm-i-004 +m3ua-sgp-aspsm-o-001 +m3ua-sgp-aspsm-o-003 +m3ua-sgp-aspsm-o-004 +m3ua-sgp-asptm-v-001 +m3ua-sgp-asptm-v-003 +m3ua-sgp-asptm-v-006 +m3ua-sgp-asptm-v-008 +m3ua-sgp-asptm-v-010 +m3ua-sgp-asptm-v-011 +m3ua-sgp-asptm-i-001 +m3ua-sgp-asptm-i-004 +m3ua-sgp-asptm-i-005 +m3ua-sgp-asptm-i-006 +m3ua-sgp-asptm-i-008 +m3ua-sgp-asptm-i-010 +m3ua-sgp-asptm-o-001 +m3ua-sgp-asptm-o-003 +m3ua-sgp-mtr-v-002-alternate +m3ua-sgp-mtr-v-003-alternate +m3ua-sgp-mtr-i-001 +m3ua-sgp-mtr-i-002 +m3ua-sgp-mtr-i-003 +m3ua-sgp-rkm-v-001 +m3ua-sgp-rkm-v-002 +m3ua-sgp-rkm-v-003 diff --git a/nplab-m3ua-test/dotguile b/nplab-m3ua-test/dotguile new file mode 100644 index 0000000..e29a144 --- /dev/null +++ b/nplab-m3ua-test/dotguile @@ -0,0 +1,35 @@ +;;; +;;; Copyright (c) 2011 Michael Tuexen +;;; All rights reserved. +;;; +;;; Redistribution and use in source and binary forms, with or without +;;; modification, are permitted provided that the following conditions +;;; are met: +;;; 1. Redistributions of source code must retain the above copyright +;;; notice, this list of conditions and the following disclaimer. +;;; 2. Redistributions in binary form must reproduce the above copyright +;;; notice, this list of conditions and the following disclaimer in the +;;; documentation and/or other materials provided with the distribution. +;;; +;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +;;; SUCH DAMAGE. +;;; +;;; $Id: dotguile,v 1.1 2012/08/26 21:06:27 tuexen Exp $ + +;;; Change the following line to reflect where the files are located. +(define dir "/tmp/m3ua-testtool/") +(define files (list "common.scm" + "m3ua.scm" + "m3ua-asp-tests.scm" + "m3ua-sgp-tests.scm")) +(map (lambda (file) (load-from-path (string-append dir file))) files) +(load-from-path "/data/m3ua-param-testtool.scm") diff --git a/nplab-m3ua-test/jenkins.sh b/nplab-m3ua-test/jenkins.sh new file mode 100755 index 0000000..800c5b2 --- /dev/null +++ b/nplab-m3ua-test/jenkins.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "debian-jessie-build" \ + "osmo-stp-$IMAGE_SUFFIX" \ + "debian-stretch-titan" \ + "nplab-m3ua-test" + +mkdir $VOL_BASE_DIR/m3ua-tester +cp m3ua-param-testtool.scm all-sgp-tests.txt $VOL_BASE_DIR/m3ua-tester/ + +mkdir $VOL_BASE_DIR/stp +cp osmo-stp.cfg $VOL_BASE_DIR/stp/ + +network_create 172.18.7.0/24 + +# start container with STP in background +docker run --rm \ + --sysctl net.ipv6.conf.all.disable_ipv6=0 \ + --network $NET_NAME --ip 172.18.7.200 \ + -v $VOL_BASE_DIR/stp:/data \ + --name ${BUILD_TAG}-stp \ + -d $REPO_USER/osmo-stp-$IMAGE_SUFFIX + +# start docker container with tests +docker run --rm \ + --network $NET_NAME --ip 172.18.7.2 \ + -v $VOL_BASE_DIR/m3ua-tester:/data \ + --name ${BUILD_TAG}-m3ua-test \ + $REPO_USER/nplab-m3ua-test > $WORKSPACE/logs/junit-xml-m3ua.log + +docker container stop -t 1 ${BUILD_TAG}-stp + +network_remove +collect_logs diff --git a/nplab-m3ua-test/m3ua-param-testtool.scm b/nplab-m3ua-test/m3ua-param-testtool.scm new file mode 100644 index 0000000..10ca653 --- /dev/null +++ b/nplab-m3ua-test/m3ua-param-testtool.scm @@ -0,0 +1,136 @@ +;;; +;;; Copyright (C) 2004, 2005 M. Tuexen tuexen@fh-muenster.de +;;; +;;; All rights reserved. +;;; +;;; Redistribution and use in source and binary forms, with or +;;; without modification, are permitted provided that the +;;; following conditions are met: +;;; 1. Redistributions of source code must retain the above +;;; copyright notice, this list of conditions and the +;;; following disclaimer. +;;; 2. Redistributions in binary form must reproduce the +;;; above copyright notice, this list of conditions and +;;; the following disclaimer in the documentation and/or +;;; other materials provided with the distribution. +;;; 3. Neither the name of the project nor the names of +;;; its contributors may be used to endorse or promote +;;; products derived from this software without specific +;;; prior written permission. +;;; +;;; THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS +;;; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +;;; BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +;;; DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS +;;; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +;;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +;;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +;;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +;;; IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +;;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +;;; OF SUCH DAMAGE. + +;;; $Id: m3ua-param-testtool.scm,v 1.5 2012/08/28 19:56:13 tuexen Exp $ + +;;; Define a transport address of the system under test (osmo-stp) +(define sut-addr "172.18.7.200") +(define sut-port m3ua-port) +(define sut-port-1 m3ua-port) +(define sut-port-2 m3ua-port) + +;;; Define the transport address of the tester +(define tester-addr "172.18.7.2") +(define tester-port 3333) +(define tester-port-1 3000) +(define tester-port-2 3001) + +;;; Define the point code of the IUT +(define iut-pc 1) + +;;; Define the point code of the tester +(define tester-pc 23) +(define tester-pc-1 100) +(define tester-pc-2 101) +(define tester-invalid-pc 102) +(define tester-unauthorized-pc 103) +(define tester-unprovisioned-pc 104) +(define tester-unavailable-pc 1234) +(define tester-available-pc 1235) +(define tester-congested-pc 1236) +(define tester-restricted-pc 1237) + +;;; Define a valid SS7 message and SI +(define ss7-message (list 11 34 45 67 67 89)) +(define ss7-si 0) + +(define iut-ni 1) +(define iut-mp 0) +(define iut-sls 0) + + +;;; Define correlation id +(define correlation-id 1) + +;;; Define network appearance +(define network-appearance 1) +(define invalid-network-appearance 2) + +;;; Define an routing context +(define tester-rc-valid 23) +(define tester-rc-valid-1 1) +(define tester-rc-valid-2 2) + +;;; Define an invalid routing context +(define tester-rc-invalid 3) + +;;; Define an asp-identifier +(define asp-id 1) +(define asp-id-1 1) +(define asp-id-2 2) + +;;; Define traffic-type-mode +;;;(define traffic-mode m3ua-traffic-mode-type-override) +(define traffic-mode m3ua-traffic-mode-type-loadshare) +;;;(define traffic-mode m3ua-traffic-mode-type-broadcast) + +(define asp-up-message-parameters (list)) +;;; (define asp-up-message-parameters (list (m3ua-make-asp-id-parameter asp-id))) +;;;asp-up-message-parameters + +(define asp-active-message-parameters (list)) +;;;(define asp-active-message-parameters (list (m3ua-make-traffic-mode-type-parameter traffic-mode) +;;; (m3ua-make-routing-context-parameter (list tester-rc-valid)))) +;;;asp-active-message-parameters + +(define asp-active-ack-message-parameters (list)) +;;;(define asp-active-ack-message-parameters (list (m3ua-make-traffic-mode-type-parameter traffic-mode) +;;; (m3ua-make-routing-context-parameter (list tester-rc-valid)))) +;;;asp-active-ack-message-parameters + +(define asp-inactive-message-parameters (list)) +;;;(define asp-inactive-message-parameters (list (m3ua-make-traffic-mode-type-parameter traffic-mode) +;;; (m3ua-make-routing-context-parameter (list tester-rc-valid)))) +;;;asp-inactive-message-parameters +(define asp-inactive-ack-message-parameters (list)) +;;;(define asp-inactive-ack-message-parameters (list (m3ua-make-routing-context-parameter (list tester-rc-valid)))) +;;;asp-inactive-ack-message-parameters + +(define data-message-parameters (list)) +;;;(define data-message-parameters (list (m3ua-make-network-appearance-parameter network-appearance) +;;; (m3ua-make-routing-context-parameter (list tester-rc-valid)))) +;;;data-message-parameters + +;;; Define parameter for DATA message +(define rc 23) +(define opc 1) +(define dpc 2) +(define si 0) +(define sls 0) +(define ni 0) +(define mp 0) +(define ss7-message (list 11 34 45 67 67 89)) +(define data-message-parameters (list (m3ua-make-routing-context-parameter (list rc)))) + diff --git a/nplab-m3ua-test/osmo-stp.cfg b/nplab-m3ua-test/osmo-stp.cfg new file mode 100644 index 0000000..23d94e0 --- /dev/null +++ b/nplab-m3ua-test/osmo-stp.cfg @@ -0,0 +1,71 @@ +! +! osmo-stp (0.0.6.3.179-b248) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 0 + logging level all everything + logging level lglobal notice + logging level llapd notice + logging level linp debug + logging level lmux notice + logging level lmi notice + logging level lmib notice + 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 debug + logging level lsccp debug + logging level lsua debug + logging level lm3ua debug +log file /data/osmo-stp.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging level all everything + logging level lglobal notice + logging level llapd notice + logging level linp debug + logging level lmux notice + logging level lmi notice + logging level lmib notice + 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 debug + logging level lsccp debug + logging level lsua debug + logging level lm3ua debug +! +line vty + no login + bind 0.0.0.0 +! +cs7 instance 0 + asp asp0 0 2905 m3ua + remote-ip 172.18.7.2 + asp asp-s-0 0 14001 sua + remote-ip 172.18.7.3 + as as0 m3ua + asp asp0 + routing-key 23 0.2.7 + as as-s-0 sua + asp asp-s-0 + routing-key 24 0.3.0 + route-table system + update route 0.2.7 0.2.7 linkset as0 + update route 0.3.0 0.3.0 linkset as-s-0 + listen m3ua 2905 + local-ip 172.18.7.200 + listen sua 14001 + local-ip 172.18.7.200 |