Commit Graph

31 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
Neels Hofmeyr 81f6944d15 bsc: enable LCS tests for normal bsc master tests
Change-Id: I3394f391a6068ab8afeafa329b69a8ae4ad05cd9
2020-10-15 04:11:04 +00:00
Philipp Maier 148f45de7c BSC_Tests: disable IPV6 parameter mp_media_mgw_offer_ipv6 for latest
Change-Id: I63f9d751c8b1347d2e14ab408830ba4858e133b2
Depends: osmo-ttcn3-hacks I30c77abef63636bb02db12d2f2b2d79ea244b96c
2020-09-29 22:40:21 +00:00
Pau Espin a985e1bd6e ttcn3-bsc: Enable osmo-bsc SS7 multi-homing and IPv6 features in tests
Change-Id: I662ede0957a67c7a733cba8e4e65bf0c8c72b878
2020-08-30 14:15:27 +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
Daniel Willmann 68ddce97e3 Update bsc tester config to enable stats testing
Change-Id: I6ed591cdc4d3108547eda2a1755ae6f6cef2b4d2
Related: SYS#4877
Depends: I8526b645dc4af59adcc1855699421a026f505c1d (osmo-ttcn3-hacks)
2020-08-13 23:00:44 +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
Pau Espin ad4fa373a8 bsc: Store osmo-bts-omldummy logs out of docker container
Change-Id: I0c02c4a9311122c3fe8ca877e02043f697723281
2020-06-25 13:42:59 +02:00
Neels Hofmeyr 42b731e09b ttcn3-bsc-test latest: remove MSC pooling specific bits in latest build
Change-Id: I2b129caa513686a105d31ae56b065757b12fcac8
2020-06-24 20:39:02 +02: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
Neels Hofmeyr b0b594e77c attempt to capture core dump from osmo-stp during ttcn3-bsc-test run
When launching osmo-stp-master from ttcn3-bsc-test, set ulimit=-1 to allow core
files.

In osmo-stp-master set WORKDIR to /data to hopefully get the core file ending
up there without the need to set a /proc/sys/kernel/core_pattern globally in
the jenkins slave.

Change-Id: Idd67fcb3f564b9cff9b4596bf639ed1bd1b58daf
2020-06-20 18:42:57 +02: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 2cdab85e5f bsc: Disable osmux for ttcn3-bsc-test-latest
Latest tagged version of osmo-bsc 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 I61e4c59b2926f3f70cb6d0190a8683861e54179a
Change-Id: I745b210f43cb147d323a15f78c294f70ee077729
2019-05-28 18:42:01 +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 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
Harald Welte 32f13b23af ttcn3-bsc-test: Fix location of respawn.sh script 2018-03-19 07:47:10 +00:00
Harald Welte c99a78fc9e remove osmo-bts-omldummy container, it's now part of osmo-bts-master 2018-03-17 15:41:43 +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 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 9efd75aa44 bsc-test: omldummy now has an argument for number of TRX 2018-02-06 20:30:08 +01: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 084967574e add ttcn3-bsc-test container with osmo-bsc test suite 2017-12-17 17:21:04 +01:00