Files
debos/docker
Christopher Obbard c66a48d699 Run recipe tests using UML on GitHub actions
Running the tests on the host is a good first step; to test Debos
properly we should run inside a Fakemachine. Since GitHub actions
do not support creating nested virtual machines, use the
user-mode-linux backend in Fakemachine to create a user process
to run the tests inside of.

Since Docker autobuild does not support UML the docker-compose
file purposely does not have a suffix of `.test.yml` so that the
test will not be picked up to run on Docker autobuild.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2021-07-07 22:11:52 +02:00
..

debos

Docker container for 'debos' tool.

Installation

docker pull godebos/debos

Debos needs virtualization to be enabled on the host and shared with the container.

Check that kvm is enabled and writable by the user running the docker container by running ls /dev/kvm

Usage

/!\ This container should be used as an executable, i.e. there is no need to add debos after godebos/debos.

To build recipe.yaml:

cd <PATH_TO_RECIPE_DIR>
docker run --rm --interactive --tty --device /dev/kvm --user $(id -u) --workdir /recipes --mount "type=bind,source=$(pwd),destination=/recipes" --security-opt label=disable godebos/debos <RECIPE.yaml>

Container build

To build the debos container image from current git branch:

docker build -f docker/Dockerfile -t godebos/debos .

Tests

Unit tests

Run unit tests:

docker-compose -f docker/unit-tests.test.yml up --build --exit-code-from=sut

Test recipes

Run test recipes on host:

docker-compose -f docker/recipes.test.yml up --build --exit-code-from=sut

Run test recipes using UML backend:

docker-compose -f docker/recipes-test-uml.yml up --build --exit-code-from=sut