Commit
12b961942af0c6761573d0632ca0e16339fb33c3
by Oliver Smith
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.
Commit
033c6ab1be7e5ab5883927465cd5313551df5bab
by Oliver Smith
*/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.
Commit
cf43f686ac942d97f572715e04a617bbbef4df29
by Oliver Smith
jenkins-common: put fix_perms() in clean_up_common
Don't call fix_perms from collect_logs anymore, it looks like it was only added there to avoid adding it at the end of each jenkins.sh. Now that we have clean_up_common, put it there.
Commit
79e48fd3ae1279eeaa3373d92d343f2dbfae075e
by Oliver Smith
ttcn3-ggsn-test: add kernel test
Make it possible to run ttcn3-ggsn-test against osmo-ggsn with the GTP kernel module. This feature is enabled by environment variables explained in ttcn3-ggsn-test/jenkins.sh, and can either use the pre-built kernel from Debian, or build a kernel from source.
The kernel runs inside QEMU inside the usual osmo-ggsn-master docker image.
Thanks to Pau for providing the kernel config and kernel-test scripts that this patch is based on! I ended up modifying them quite a bit to fit the docker use case, and to build the initrd (so we can use the stock debian kernel).