Commit Graph

15 Commits

Author SHA1 Message Date
Harald Welte 43b1f4a901 fr: kill the frnet container before trying to 'rm' it
+ docker container rm jenkins-ttcn3-fr-test-109-frnet jenkins-ttcn3-fr-test-109-ttcn3-fr-test
jenkins-ttcn3-fr-test-109-ttcn3-fr-test
Error response from daemon: You cannot remove a running container 4f5ec7f412b2d37d00b2738b2bcddffada36efebfe7ce32ed196543ee436154e. Stop the container before attempting removal or force remove

Change-Id: I66ed0d073bdd6962f78da54232d6bc58adc09e2c
2021-03-16 16:23:51 +00:00
Vadim Yanitskiy c91f6c4df5 ttcn3-fr-test: store execution logs for both containers
Change-Id: I60e60bfdc9f6b8fde81189d35d0ca4e73e310cc7
2021-03-16 15:45:42 +01:00
Vadim Yanitskiy 241547a6ba ttcn3-fr-test: add missing TTCN3_PCAP_PATH for '-frnet' container
Change-Id: Ide1b10f342f1f9d2b3bf432291218ed057f51de8
2021-03-16 11:10:08 +01:00
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
Oliver Smith 6f6724178b ttcn3: use REGISTRY arg with debian-stretch-titan
Allow jenkins to fetch the image from our private docker registry.
Outside of jenkins, the image is built locally just like before.

Related: OS#5017
Change-Id: I46cc176ea09d8badc359b627d7ce2f459211258c
2021-02-11 16:27:23 +01:00
Oliver Smith ce824cc3e1 ttcn3-{fr,gbproxy}-test: use ttcn3-docker-run too
Move the shared pipework script to the base image, and call it in
ttcn3-docker-run.sh if WAIT_FOR_NETDEV is set. Use ttcn3-docker-run.sh
as entrypoint in both Dockerfiles and remove the custom entrypoint
scripts (which are the same as ttcn3-docker-run.sh now).

Related: OS#5017
Change-Id: I2889abe94ed522a205890e5cb39e09cbebfbd820
2021-02-11 15:45:40 +01:00
Oliver Smith 914a486ef1 debian-stretch-titan: prepare: start/stop links
Create symlinks to ttcn3-*-start.sh and ttcn3-*-stop.sh in the
prepare.sh script instead of in each of the ttcn3 Dockerfiles.

Related: OS#5017
Change-Id: I634cf71cff7936efe6e0461d21dc1119de922ada
2021-02-11 15:45:40 +01:00
Oliver Smith 892d910444 ttcn3: move prepare code to shared script
Move the git fetch/checkout code and make call to build the testsuite,
to debian-stretch-titan/ttcn3-docker-prepare.sh. In the next patch, I
will extend the script to update deps right before building too (e.g.
because OSMO_TTCN3_BRANCH changed).

Related: OS#5017
Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
2021-02-11 15:45:40 +01:00
Oliver Smith 61fed0ad39 ttcn3: move initial clone to debian-stretch-titan
Clone the osmo-ttcn3-hacks and all dependency repositories less often by
moving related commands to the shared debian-stretch-titan image.

Remove the 'git checkout -f -B master origin/master' line, because the
master branch is checked out by default.

While at it, move the shared "git config" commands too, and move them
before cloning the repositories, so they don't run again whenever the
deps change (logic to invalidate the cache if deps change will be added
in the next patch).

Related: OS#5017
Change-Id: I2bb142dce061eba4b6a828c4e435510e309989fd
2021-02-11 15:45:40 +01:00
Oliver Smith db3f98113c ttcn3: remove /root/projects/git symlink
Remove leftover from old TTCN-3 build scripts, before refactoring ttcn3
Dockerfiles. This line has already been removed in 357ec806 from 2017 for
ggsn-test.

In osmo-ttcn3-hacks.git, this is only referenced in the obsolete
bin/install.script (looks like we could remove that, together with the
rest of the bin dir?).

Related: OS#5017
Change-Id: Id23e7fae58ba246916a38aa0a10035d4f67f7588
2021-02-11 15:45:40 +01:00
Harald Welte bd94a1443e ttcn3-fr-tests: Configure MTU to 1700
On our deb10fr VMs we have the modified kernel HDLC module supporting
the frame relay MTU up to 1700 bytes, so let's extend our tests to cover
that.  Mainline kernels only support 1500 bytes.

Depends: osmo-ttcn3-hacks.git I8e38ecf6b270c81bd73ee43b1fa0b259a999c14b
Change-Id: Id25532edbf5e1a918ad038723da464723d6f03f0
2021-02-04 15:01:57 +01:00
Harald Welte ed6163df50 ttcn3-fr-tests: Disable junit-xml generation for FRNET_Tests
FRNET_Tests is not a test suite, but just a stub against which we
execute FR_Tests.  Hence, we don't want it to generate a junit-xml,
as that doesn't contain any errors and only upsets our jenkins
test results analyzer, assuming the tests have failed.

Change-Id: Idec2bf8da30ccd211b21901d56979143ce3a172f
Requires: osmo-ttcn3-hacks.git Id296e62fb86731492d42370173a48f217b2fbdc0
2021-02-04 10:38:15 +01:00
Harald Welte 18564ba9c2 New ttcn3-fr-test container
Change-Id: I32433871e25de46ef58b70af46400cbb4dc0dbc5
2021-02-03 22:20:20 +01:00