Commit Graph

33 Commits

Author SHA1 Message Date
Oliver Smith 033c6ab1be */jenkins.sh: set -e after setting clean up trap
Abort the script and trigger the clean up script, whenever any of the
commands below to prepare the testsuite are failing. This saves time
with figuring out why suddenly all or most tests are failing, and avoids
running the entire testsuite on jenkins if it's obviously not going to
work.

Related: OS#3208
Change-Id: Ie68da2affda8c96b3a515a857a921a05f1bf8ef7
2021-02-26 09:32:34 +01:00
Oliver Smith 12b961942a jenkins-common.sh: add common clean up trap
Add set_clean_up_trap() in jenkins-common.sh and run it at the beginning
of the jenkins.sh files. Move the common clean up code from the end of
every jenkins.sh file into clean_up_common(), which gets called by the
trap. Add a custom clean_up() function to those jenkins.sh files that
need additional clean up.

Replace explicit container stop commands (for containers attached to the
docker network) with one call to network_clean() in clean_up_common(). It
kills all containers attached to the docker network.

The motivation for this change is the upcoming optional build of initrd
and kernel during ttcn3-ggsn-test/jenkins.sh. After building these, a
short smoke test will be performed to make sure we can boot the kernel
and initrd, before continuing to run the entire testsuite against it. If
building or the smoke test fails, we must do a proper clean up of the
network and fix permissions.

Related: OS#3208
Change-Id: I807c6221d22fec31db23e2516e477a3eb43347fb
2021-02-26 09:32:06 +01:00
Pau Espin c63a131a60 Remove test backward compatibility with older osmo-* versions
These changes are no longer needed since master versions of whole CNI
have been recently released.

Related: OS#5042
Change-Id: I6f491b58d4576b22c8ff3ab56a7b9e17163a8739
2021-02-25 16:41:47 +01:00
Pau Espin 0b1371c101 ttcn3-msc: Force MNCCv6 on ttcn3-msc-test-latest
Default is MNCCv7 since osmo-ttcn3-hacks.git
I5448ff931ec33f24f4837a51376f1703fe97683b, but latest tagged version of
osmo-msc only supports MNCCv6.

Change-Id: Iaac2f5453214dfcf6efd070f6ea1212a7833eb1b
2020-09-16 12:35:21 +02:00
Pau Espin be98438d94 ttcn3-msc: Update module params against new osmo-ttcn3-hacks.git
module param mp_enable_osmux_test is dropped in osmo-ttcn3-hacks.git
I8bc0551ec91a5fd8ea2f291a1e16a06a739c7a75.
module param mp_enable_crashing_tests is introduced in
osmo-ttcn3-hacks.git I46f1066323e19dfe708402a8c9c68e257f62751c.

Change-Id: I22bb43ba6d15eabcc731a2c3ef7aabc4f250d508
2020-09-15 20:54:02 +00:00
Pau Espin 2025b1a3f0 ttcn3-msc: Enable osmo-msc SS7 multi-homing and IPv6 features in tests
Change-Id: I784eb033a4887c5a9f2bfaa52aa39cb86cdf13ce
2020-08-30 16:07:10 +00:00
Pau Espin 1f45fb08ff jenkins-common.sh: Add function to print docker network related parameters
Change-Id: Ie00561de7a4494065156a124565e2190151e6019
2020-08-27 12:49:43 +02:00
Harald Welte a8521eb11a msc: Disable expecting CommonID when testing 'latest'
As of osmo-ttcn3-hacks.git Change-Id I4976d9bb1f07c8ab4ffa02848414f8ddd1bdfd3f
the test suite expects the MSC to send a CommonID to the BSC.  As
older/existing tagged osmo-msc don't do that, we needt odisable that
check when verifying 'latest'.

Change-Id: If2e4cc41cb7b5758a78d694d62b34390a08e6387
Related: OS#2969
2020-08-19 07:29:31 +00:00
Harald Welte 873f496d2b migrate ttcn3-msc-test from 172.18.1.0/24 to 172.18.20.0/24
When introducing IPv6 support, we map the third digit of the IPv4
address (X) to the 6th byte of an IPv6 prefix "fd02:db8:X::/64"

However, the docker daemon seems to use "fd02:db8:1::/64" internally
for its default network, so creating a docker network with the same
IP address is failing.

Let's move the MSC test suite to another sub-net (1->20) to avoid
related problems.

Change-Id: I9c5f9b96d5523eae09f3f2e6c813e9e0d047f9ab
2020-08-14 08:03:41 +02:00
Harald Welte 306a51dd30 Enable IPv6 in docker networking
We previously only allocated IPv4 sub-nets to the network segments
created with 'docker network'.  Let's fix that by assigning both
IPv4 and IPv6 address ranges to each docker network.

Related: OS#4700
Change-Id: I8802208fddcce1ffa57e5626575d23d02b320d99
2020-08-13 15:01:58 +00:00
Neels Hofmeyr 37a603b1d3 ttcn3-msc-test latest: do not require VLR cell id match in latest build
Depends: Ie410714a96353f74a52a104c56fa0a08683e0004 (osmo-msc)
Change-Id: I052fea208021509e12826c50474b96474e7a58c2
2020-07-08 01:45:41 +00:00
Neels Hofmeyr 04c20edefd collect core dumps: '--ulimit core=-1' and WORKDIR=/data everywhere
Change-Id: Ief73b53ed9da6f5af82975bc36d851277d5d3185
2020-06-21 20:58:22 +00:00
Oliver Smith 5505b95a15 ttcn3-*-test: remove implicit dependencies
Don't list debian-stretch-build and debian-stretch-titan as dependencies
anymore, now that docker_images_require finds them automatically.

Related: OS#4564
Change-Id: I3cb6b693f3dd9df84fb29c0217bb3dae454cc18f
2020-05-30 09:14:06 +02:00
Oliver Smith f48c09d3bc ttcn3-*-test/jenkins*.sh: add $DOCKER_ARGS
Allow to pass options to each "docker run" line in the various
jenkins.sh scripts. I'm using this to run the testsuites and Osmocom
components in docker with the same configurations as jenkins, but with
Osmocom and testsuite binaries built outside and mounted into the
containers:

DOCKER_ARGS="-v /usr/local:/usr/local:ro -v $hacks:/osmo-ttcn3-hacks:ro"

This allows very short test cycles without a second set of configs. The
full script that makes use of this feature is in osmo-dev.git,
ttcn3/ttcn3.sh.

Change-Id: I8d1f78aee926f8f6ec0b704e16639bc83f525816
2020-05-06 06:22:12 +00:00
Pau Espin c3f157b939 Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file
This way we get VTY parsing failures as well as backtraces upon process
crash.

Related: OS#4212
Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5
2019-11-20 17:17:45 +01:00
Pau Espin 38f51b709f ttcn3-bsc/msc: Drop fixups for latest releases not supporting osmux
Last releases of osmo-bsc and osmo-bsc already support Osmux, so we can
drop those lines as indicated.

Change-Id: Id6a18f2d691f6e9234a5a0cf91ed5c840a6394de
2019-08-19 19:24:39 +02:00
Pau Espin bf0d5075cb msc: Disable osmux for ttcn3-msc-test-latest
Latest tagged version of osmo-msc doesn't support "osmux on/off" VTY
commands, so we have to enable osmux use on that version to avoid most
TTCN3 tests failing during set up phase.

Depends: osmo-ttcn3-hacks.git I53d58b2d905905ebf1df322d0389b3715a48212f
Change-Id: I6b3be3981978661de2fa90be130f6f1811a3d1f9
2019-05-31 18:05:40 +02:00
Harald Welte 7c53c9e60d Switch all osmo-*-master and ttcn3-*-test from jessie to stretch
Jessie will be EOL in June 2019, let's make the switch to stretch
before that.

Change-Id: I37a534d07081f3d321869c86d49d03171c8da0c6
2019-03-30 09:56:36 +00:00
Oliver Smith 6687896c64 ttcn3-*-test: don't hardcode /usr/local/bin/
Remove hardcoded /usr/local/bin/ paths from jenkins.sh. This caused the
*-latest tests to fail, as they have the Osmocom binaries in /usr/bin
instead of /usr/local/bin.

Related: OS#3767
Change-Id: I9d1427e66028ffd15fed211b2dab5adc37718666
2019-01-28 13:58:02 +01:00
Max af8749c348 MSC: use config file for mncc path
Use config file parameter instead of command line option for MNCC socket
path.

Change-Id: I689cfb3bad09b76859ef7e42c1312c636eebe637
2018-12-12 17:43:35 +01:00
Oliver Smith ccf62eb231 jenkins.sh: IMAGE_SUFFIX, docker_images_require()
Default value "master" of the IMAGE_SUFFIX environment variable can be
changed to "latest" to test the latest stable builds instead of the
nightly ones. Use docker_images_require() to make sure that the required
images are existing and up-to-date before running the tests.

Related: OS#3268
Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
2018-10-26 10:19:05 +02:00
Neels Hofmeyr 2f61bf81e9 jenkins.sh: have one common function to collect logs
To remove code dup and prepare a change to where logs are written, add
collect_logs() to jenkins_common.sh and call that from each jenkins.sh after
the tests are done.

The 'rm -rf' is already done before a test starts. No need to do that again
after each test.

Change-Id: I5d8472ec36b07c828685b1bd7718e31392d168a3
2018-04-24 13:46:05 +00:00
Pau Espin 56276f95fd jenkins.sh: Fix trailing whitespace 2018-02-19 12:03:39 +01:00
Pau Espin 51deedd956 *-test: jenkins.sh: Print junit output at the end 2018-02-19 11:59:00 +01:00
Harald Welte 8e57c545ab ttcn3-msc-test: remove correct unix domain socket dir 2018-02-18 12:47:15 +01:00
Harald Welte b25e1ea779 ttcn3-msc-test: remove unix domain socket dir from both containers 2018-02-18 12:24:33 +01:00
Harald Welte 226090762a ttcn3-msc-test: Remove unix domain socket before copying logs
jenkins otherwise fails when collecting the build artefacts
2018-02-16 20:05:55 +01:00
Harald Welte a36a6019c7 ttcn3-msc-test: Remove unix domain socket before copying logs
jenkins otherwise fails when collecting the build artefacts
2018-02-15 06:51:22 +00:00
Harald Welte c1694826e4 Use new split config file + tcpdump support of osmo-ttcn3-hacks
This uses osmo-ttcn3-hacks Change-Id
I3db452e24e5238aa05254d903739c64d202e61db, which introduces
some shared/common config file as well as per-testcase pcap file
generation.
2018-02-14 19:06:46 +00:00
Harald Welte d770629280 jenkins: Add shared jenkins-common.sh
the common script contains some copy+pasted parts between the different
jobs.
2018-02-06 20:20:49 +00:00
Harald Welte bcc29baf39 jenkins: prefix all container names with $BUILD_TAG
... to make them unique and to allow for multiple tests run in parallel
without any clashes.
2018-02-06 19:57:24 +00:00
Harald Welte facbb6575e move every 'test network' to its own IP address space
Ideally we would want to launch a group of containers with their own
private network segment and use the same static IP addresses in those
isolated networks.

The stupidity of docker is requiring unique IPv4 addresses even on
isolated (!) networks.  This means we have to manually give each of our
test setups a different subnet, and then we can at least run one
instance that test in parallel to at most one instance of each other
test.

If this weird reestriction about unique IPv4 addresses didn't exist,
we could start any number of test runs in parallel.
2018-02-06 19:08:45 +01:00
Harald Welte 8fc4202fae Add ttcn3-msc-test container with OsmoMSC test suite 2018-01-27 20:25:10 +01:00