Commit Graph

299 Commits

Author SHA1 Message Date
Daniel Willmann 6e601e60ad Add script to bisect test failures with ttcn3 and docker
With this script you can now use docker ttcn3 test results to bisect a
regression and find the offending commit.

Use like this from the osmo-* git repository:
$ git bisect start <bad-rev> <good-rev>
$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh <component-to-test> <testcase>
e.g.:
$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc BSC_Tests.TC_ho_in_fail_no_detect

Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
2019-04-26 12:07:15 +02:00
Daniel Willmann b59a9ed8d4 Add OSMO_*_BRANCH environment variables for build args
Previously we could only set OSMO_TTCN3_BRANCH as environment variable
to build a test other than master.

This patch adds environment variables for all osmo-*-master images which
allow docker tests to be executed for an arbitrary commit.

The origin/ prefix from the git checkout command is removed so the
*_BRANCH variable doesn't have to contain branch names, but van also
contain arbitrary commits. This shouldn't have any adverse effect as we
only have one remote in the checkout.

Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869
2019-04-25 13:56:14 +02:00
Harald Welte a7deb5d7a8 debian-stretch-titan: include libfftranscode for our Iu related tests
Change-Id: Ifd7d682df90f1b17823d8358a8a498f149e4591b
2019-04-21 11:00:45 +00:00
Harald Welte 6657ba7889 Use ftp.debian.org as a "blind workaround" for trouble with ftp.de
We get a lot of build failures recently like this:

Step 3/4 : ADD  http://ftp.de.debian.org/debian/dists/stretch/Release /tmp/Release
ADD failed: Get http://ftp.de.debian.org/debian/dists/stretch/Release: dial tcp 141.76.2.4:80: i/o timeout
../make/Makefile:44: recipe for target 'docker-build' failed
make: *** [docker-build] Error 1
make: Leaving directory '<https://jenkins.osmocom.org/jenkins/job/ttcn3-sip-test/ws/debian-stretch-build'>
+ exit 1

Let's hope that this works around the connectivity problems with
ftp.de.debian.org

Change-Id: I5a0eb058d95372c44fce042de90c4127a3021a93
2019-04-17 09:10:48 +02:00
Oliver Smith bdfb823f05 nplab-m3ua-test: support running without jenkins
Don't use $WORKSPACE anymore, use $VOL_BASE_DIR like in every other
jenkins.sh in this repository. Make it possible to run jenkins.sh
outside of jenkins (where $WORKSPACE is not set), because
jenkins_common.sh will set up $VOL_BASE_DIR to point to /tmp/logs.

Change-Id: I200b4ee1760a879cbc0a80a30a062a3f2a8e703d
2019-04-05 08:30:28 +02:00
Oliver Smith e021ae6ab3 nplab-m3ua-test: add sigtran-tests dependency
Make sure to build sigtran-tests before building nplab-m3ua-tests. This
has been working by coincidence without the dependency so far, because
nplab-sua-test had the dependency listed and that test ran on the same
host.

Change-Id: I9df1d2b188e86b3c99c6ec793b6eb644ab3c27c9
2019-04-05 08:20:20 +02:00
Oliver Smith e8cd52f074 gitignore: add .release
Ignore .release files generated by make/Makefile.

Change-Id: I9ea8e4326f6da2ff95cf45999637c89f884a9e19
2019-04-04 10:46:14 +00:00
Oliver Smith 052fe1bb8a make/Makefile: fix recursive 'PULL' error
Don't abort with the following error, when running 'make' without
setting the PULL environment variable:

 ../make/Makefile:20: *** Recursive variable 'PULL' references itself (eventually). Stop.

This fixes a regression from Change-Id
I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6.

Related: OS#3869
Change-Id: I4b4772e9ed6e07ab00943154265c9cbdea22a2f5
2019-04-04 08:16:44 +02:00
Oliver Smith a8be3ff52f jenkins-common.sh: pull upstream base images
Prevent building docker images on top of outdated Debian images, where
the package download feeds have been disabled. Use 'docker build --pull'
instead of 'docker build', whenever the "FROM" line in the Dockerfile
does not contain '$USER' (meaning this is an upstream image).

Checking the FROM line is necessary, as downloading '$USER' images will
fail (we never upload those).

Related: OS#3869
Change-Id: I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6
2019-04-02 11:38:26 +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
Harald Welte cffe1022b5 print branch name and git commit hash during docker container build
This is quite useful when looking at jenkins logs to know which exact
version was built at the time.

Change-Id: Id52c382b454e2beecf46820752aeff15b2c1a0ae
2019-03-29 16:40:40 +00:00
Daniel Willmann 2e3a5c1c53 ttcn3-bscnat-test: osmo-bsc_nat config file fixes
* Log to file in osmo-bsc_nat
* Fix number of endpoints so the test passes

Change-Id: Ie90ef6a6e09a3c47955297dedf78121e2c5cbe31
2019-03-29 11:14:36 +00:00
Daniel Willmann 1b5ed832c8 osmo-cn-latest: Add default osmo-msc.cfg
Change-Id: I821f76ace7dfd666a6ba6aa382eafa6527af7ba6
2019-03-28 13:22:22 +01:00
Daniel Willmann 8de199e54a osmo-cn-latest: Clarify steps for provisioning
Change-Id: Ia55181c791cc66ae95ce41bb1c39092d38751ecb
2019-03-28 13:22:22 +01:00
Daniel Willmann e6ce3a1414 osmo-cn-latest: Rename the script to provision the hlr
Change-Id: I49e7578879a6880664faa5bb0ac3367880f538b5
2019-03-28 13:22:22 +01:00
Daniel Willmann bdd9f05941 osmo-cn-latest: Use osmo-config-merge to configure the MSC
Change-Id: I6ccebf041d6e4fd3f9e1c6d898e2787b7de9ccca
2019-03-28 13:22:22 +01:00
Daniel Willmann 9af88da2e2 osmo-cn-latest: Add README with instructions for provisioning
Change-Id: I3e29106373cb72773f4d8b9f164aa9a6163addc7
2019-03-28 13:22:22 +01:00
Daniel Willmann c05368423c osmo-ci-latest: Add options to change mcc/mnc for SIM card data
Change-Id: Ica348dc12f07a1a57729c4d97a40cf9c04e975c9
2019-03-28 13:22:22 +01:00
Daniel Willmann 8e990c4ff7 osmo-cn-latest: Add script to populate HLR
Change-Id: I3ba73347a87e82422fcd3ec3da9acc4b70411003
2019-03-28 13:22:22 +01:00
Daniel Willmann 5ff268371f Add first osmo-cn-latest image
Core network in a container. Starts all the services, configuration
needs to be tweaked.

Change-Id: Icfddc75447fbd94f9d5c19408ccc7f3a914e083f
2019-03-28 13:22:22 +01:00
Max 8dea5c8a5a BTS tests: update NSVC config in osmo-bsc.cfg
* remove extra NSVC config
* use 0.0.0.0 for nsvc 0

The additional nsvc and this particular address are not used for BTS'
PCU-related tests in any way and only add confusion. It's likely a
result of copy-paste from another test.

Change-Id: Ie424107672496df70fc83c8fd6cef99a312fcee7
2019-03-21 16:03:51 +00:00
Philipp Maier 73f2d8b9b1 ttcn3-bsc-test: set EARFCN in osmo-bsc.cfg
Currently no EARFCN is set in osmo-bsc.cfg. This setting is required for
TC_chan_rel_hard_clear_csfb to function

Change-Id: I929c0b2927eb78573b7208683cf610be6be8812a
Related: OS#3852
2019-03-21 15:54:59 +00:00
Oliver Smith d27b222e8c ttcn3-ggsn-test: update osmo-ggsn.cfg for ipv4v6 tests
Make the TTNC3 tests pass that were added in Change-Id
I3bab7df5caddc5c8b973c81544f954d5473ac234 (osmo-ttcn3-hacks.git).

Related: OS#2900
Change-Id: Icc1ae87d87f61e2d1d0b8c6b14d28aeed56a6931
2019-03-21 16:02:58 +01:00
Harald Welte c05330e8b4 PCU: Differentiate between tests with classic and SNS Gb dialects
OsmoPCU needs to have the gb-dialect parameter configured right from
startup.  This means we'll split the ttcn3-pcu-test into two suites,
similarly to how we deal with AoIP / SCCPlite in the ttcn3-bsc-test.

Change-Id: I6e844f9ac4b87e801661fb1a1bdd25a15148f474
2019-03-14 21:38:44 +01:00
Oliver Smith ee386a6731 make/Makefile: allow overriding OSMO_TTCN3_BRANCH
Set the OSMO_TTCN3_BRANCH build argument from ttcn3-*/Dockerfile from
the environment variable of the same name, so it can be changed when
building the images with 'make' or './jenkins.sh'.

Dockerfiles that do not have a OSMO_TCCN3_BRANCH build arg produce a
warning. But this is also the case with Dockerfiles that don't have an
USER build arg, and avoiding the warning would only be possible with a
much more complex patch.

Change-Id: If2c312ff9206d1613fc19f41bd088c9aad523684
2019-03-04 13:13:37 +01:00
Harald Welte 618c7abc72 PCU: Add SNS tests to [EXECUTE] section of config file
Change-Id: I82949f75c65877ca8baf1018a335c03731c0a4e9
2019-02-28 11:27:04 +01:00
Daniel Willmann 4cc752799c Fix permissions when collecting logs
Use the debian-jessie-build container to ensure all files under
${VOL_BASE_DIR} are readable.
Call this directly from collect_logs so we handle all ttcn3 jobs.

Fixes: OS#3800
Change-Id: I124c554eee69ec5586547d3c96b8ec571e0653a7
2019-02-22 18:52:59 +01:00
Harald Welte 6359c3fe6c ttcn3-pcu-test: Use master branch, not laforge/gb-sns
All required code is now in master, let's use master.

Change-Id: I106184f3f75802ac9a3109408c8eee6597b70caa
2019-02-21 12:02:47 +01:00
Harald Welte eedbb56552 PCU: Add osmo-pcu-* + ttcn3-pcu-test containers
This will enable us to run the PCU testsuite automatically by
jenkins, just like for other Osmocom projects.

Change-Id: Ia8e2ed2e7d03b8afdc7b1e068f94b0544a8112c7
Related: OS#2890
2019-02-20 21:45:07 +00:00
Oliver Smith 0b3587fae8 debian-repo-test: blacklist soapysdr0.7
Fix conflict in debian-repo-test-latest by not explicitly installing
soapysdr0.7:

dpkg: error processing archive /tmp/apt-dpkg-install-aYn9qf/398-soapysdr0.7-module-lms7_19.01.0-1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.5-2/libLMS7Support.so', which is also in package soapysdr0.5-2-module-lms7:amd64 16.12.0+dfsg-1

I have tested locally, that debian-repo-test passes with this patch with
both FEED=latest and FEED=nightly.

Related: OS#3809
Change-Id: Ic7c6b95d20345b39af2ba0d09dddd361696723be
2019-02-20 18:13:15 +00:00
Philipp Maier 2e9ef62349 ttcn3-mgw_test: Configure VTY interface
The testsuite did not support VTY access in the past, so VTY access was
unconfigured. Lets add the required lines to the configuration files

Depends: osmo-mgw If383f81af3306f8f5bdf50152498ae1303d390df
Change-Id: Ife949c61156222de3026280071226ef6f5dbd959
Related: OS#3807
2019-02-20 17:21:14 +01:00
Philipp Maier bbd16f71f7 cosmetic: remove excess space at line end
Change-Id: I36a1b9f87f1671844e78a84121e84272e8f1d373
2019-02-14 21:35:17 +00:00
Oliver Smith 624dd4fbfb osmo-msc.cfg: remove auth policy, LU reject cause
Delete legacy config lines. They have been deleted in osmo-msc.git's
example config files in [1] and [2] almost a year ago.

When running locally, osmo-msc refuses to start with these lines. The
ttcn3-msc-test dir has its own osmo-msc.cfg file, so it works there
without this patch.

$ osmo-msc
There is no such command.
Error occurred during reading the below line:
 auth policy closed

<0006> msc_main.c:573 Failed to parse the config file: 'osmo-msc.cfg'

[1]: change-id I825e659da529257e5edec94d9d59f0e10c1b4c63
[2]: change-id Ie1f39e706477aaf42051877b52d4b3ae1c5f138e

Related: OS#3767
Change-Id: I101b69c5c25252cac346259d8d88f3e02bc943d6
2019-01-29 13:30:52 +01:00
Oliver Smith 2279152bb2 osmo-msc-latest: install libdbd-sqlite3
Fix osmo-msc crash at start up:
<0009> db.c:621 Failed to create database connection to sqlite3 db 'sms.db'; Is the sqlite3 database driver for libdbi installed on this system?
DB: Failed to init database: sms.db

It would be better if the Debian package pulled in this dependency
automatically, see OS#3771.

Related: OS#3767
Change-Id: Ia816aed8dd3b86f44f4454af89cec6f0b9d55dd1
2019-01-29 11:36:00 +01:00
Oliver Smith 0c4eba94e5 ttcn3-sip-test/jenkins.sh: remove invalid -M arg
osmo-sip-connector does not have a -M argument, it was probably
confused with osmo-msc's -M, --mncc-sock-path argument.

osmo-sip-connector printed out the following when started with -M, but
otherwise functioned normally. Because it was started with Docker in
background, the message did not get written to the build log.

osmo-sip-connector: invalid option -- 'M'

Change-Id: Iee983a8aafe8cade67b76927721fc26e5af966d7
2019-01-28 13:58:05 +01: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
Oliver Smith 761b7acd22 ttcn3-bts-test-latest: use osmocom-bb-host-master
Do not try to run a osmocom-bb-host-latest docker image, which does not
exist as we are not tagging release versions for osmocom-bb (yet).

This was done right in the docker_images_require call at the top
already (which is why it did not try to build such a "-latest" image),
but then the script tried to use the "-latest" images anyway (instead
of hardcoding "-master").

Related: OS#3767
Change-Id: Ib743f09c71d93bf4c4ad947ef62b37de6b2d7ecc
2019-01-25 12:00:00 +01:00
Oliver Smith c9fcc6e8a5 jenkins-common.sh: exit if image fails to build
docker_images_require() must fail when a new image can not be built,
even if an old image already exists.

We have this situation in a lot of the -latest tests right now, which
makes it harder to find the actual error.

Note that we can't simply use #!/bin/sh -e in all the jenkins.sh
scripts that source jenkins_common.sh, because they must be able to
clean up the docker containers on failure. So they can't abort
somewhere in the middle of the scripts. We could rewrite them to do the
clean up in a trap, but this should be done in a separate commit.

Related: OS#3767
Change-Id: I7039089457b62b8798a79c5efd62bd91622986d3
2019-01-25 10:35:01 +01:00
Vadim Yanitskiy b6c3dd787a .../osmo-bsc.cfg: drop deprecated dyn_ts_allow_tch_f
Since Ib2335d02ea545aff837aadd49f15b2fdb418c46e, this VTY option
is deprecated in osmo-bsc, so let's actualize the config files.

Change-Id: I709e1afd2a9cccdc92eec312dff607947a10c299
2019-01-14 21:07:36 +00:00
Vadim Yanitskiy bc933e91f5 ttcn3-bts-test/jenkins.sh: use logging options of fake_trx.py
Change-Id: I32bf66b1320b752450a8cb064348b3c86b1c03cd
2019-01-14 15:40:33 +07:00
Vadim Yanitskiy 53696c67e8 BTS_Tests.cfg: use the new 'mp_bts_trxc_ip' parameter
In I7736abd85407c186856be9f1a22613a1fa6e0c32 'mp_bb_trxc_ip' was
renamed to 'mp_bts_trxc_ip'. Let's correct the config.

Depends-On: (TTCN) I7736abd85407c186856be9f1a22613a1fa6e0c32
Change-Id: I886b652ddfb1afbfcf15f99672cca1d63fd714fe
2019-01-12 07:28:17 +07: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 8deb1f1aa8 cosmetic: gerrit: use variables for the files to patch
Make the code more readable, and make it easier to update the paths
if they should change again.

Change-Id: I285f7908de64f2d92fa99ae9d74fb2e29ec72771
2018-12-11 09:13:31 +00:00
Oliver Smith b6ad85bd4c gerrit: fix libopenid path
Update the path to libopenid.jar, to fix the following error and make
the container build again. This change is necessary, because we are
patching a file inside "gerrit.war", and the path to that file has been
changed upstream.

Step 4/8 : RUN  unzip /var/gerrit/bin/gerrit.war WEB-INF/lib/gerrit-openid-libopenid.jar ...
 ---> Running in 815585d87fdd
Archive:  /var/gerrit/bin/gerrit.war
caution: filename not matched:  WEB-INF/lib/gerrit-openid-libopenid.jar

Change-Id: Iaed2429a776ae587043dc2651293bb354fceeb72
2018-12-11 09:13:31 +00:00
Pau Espin 317ca49155 bts-test: osmo-bts.cfg: Enable extended timestamp
This way messages appearing in log files can be easily matched against
pcap captures.

Change-Id: Ic59c0d7ee0d3ce71e807364d156f6e38bc0c74d1
2018-12-06 18:30:21 +01:00
Oliver Smith 6f176bd924 osmo-sgsn-master: install libosmo-gsup-client-dev
This library is required for building osmo-sgsn, and because it is
currently missing, Jenkins fails. No idea why it used to work without
the dependency though.

Example failure:
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-sgsn-test/328/console

Change-Id: I1cd5eb51fea9e39d82b12f10ef36c0bf8bbce472
2018-12-06 16:27:50 +01:00
Daniel Willmann 6870d87345 Add ttcn3-bscnat-test docker image
Run the bscnat ttcn3 tests in docker. This uses the osmo-nitb-master
image since osmo-bsc_nat is built there as well.

Change-Id: Ibeebb0325d3d1976225666eb28db0741df2e66f0
2018-11-09 17:22:05 +01:00
Pau Espin f8edc56f3a bsc: osmo-bsc.cfg: Use extended timestamp
It allows for easier matching against pcap files.

Change-Id: Ida71bdd8b3ca0f8bd3f2888e10e72f2872d2e62a
2018-11-08 17:38:23 +01:00
Pau Espin 7a494a5ef2 ttcn3-bts-test: Log RACH requests in GSMTAP
Change-Id: Idae872492a6cf3306fb2e636c54038caa600646b
2018-11-01 14:49:23 +01:00
Oliver Smith fb87e1b19b Remove top-level Makefile, explain why in README
Obsoleted by docker_images_require(). The top-level Makefile had the
following drawbacks:
* it was not maintained: many targets were missing, and some of the
  existing ones did not build anymore
* make targets have the same names as the folders, so if they are not
  listed in the Makefile, it will assume that the target has been built
  already (prone to making mistakes)

Extend README.md to describe how to run tests, container caching, how
container dependencies are resolved now and the reasoning for doing
it that way instead of using a top-level Makefile.

Related: OS#3268
Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
2018-10-26 12:11:08 +02:00