Skip to content
Success

Changes

Summary

  1. testenv: support running SUT in QEMU (details)
Commit caaa0d631b8a8a4f8ed426455c36ca7e94c62ba0 by Oliver Smith
testenv: support running SUT in QEMU

Add two new arguments -C|--custom-kernel and -D|--debian-kernel. If any
of these is set, pass an environment variable TESTENV_QEMU_KERNEL with
the path to the kernel when running commands from testenv.cfg.

These commands can then source the new qemu_functions.sh and use it to
build an initramfs with the SUT and depending libraries on the fly, and
start up QEMU to boot right to starting the SUT. All of that takes about
~1s on my system with kvm. Without kvm ~5s.

A follow-up patch will adjust the ggsn testenv configs to optionally run
osmo-ggsn in QEMU for testing kernel GTP-U.

These scripts are based on scripts/kernel-tests from docker-playground.

Related: osmo-ci Id64a1a778fa38eec20498c36b390332f75d7d3f5
Change-Id: Ic9cb7092fd029b7ba530fc755b5d4d73a9d86350
The file was modified.gitignore
The file was modified_testenv/data/podman/Dockerfile
The file was modified_testenv/testenv/testenv_cfg.py
The file was modified_testenv/testenv/requirements.py
The file was modified_testenv/README.md
The file was added_testenv/data/scripts/qemu/qemu_ifup.sh
The file was added_testenv/data/scripts/qemu/qemu_init.sh
The file was added_testenv/data/scripts/qemu/qemu_wait.sh
The file was modified_testenv/testenv/__init__.py
The file was added_testenv/data/scripts/qemu/qemu_functions.sh
The file was modified_testenv/testenv/cmd.py
The file was modified_testenv/testenv/podman.py