aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2021-02-22 10:14:54 +0000
committerAlex Bennée <alex.bennee@linaro.org>2021-02-24 11:05:21 +0000
commit9c1f491e02a64882201d20fa8324884baee91fd8 (patch)
tree2d7ad3e84d39ee45c037703fa52b2d9a46afcb9b /docs
parent663a041e1dff50eaa66c8d2b01ade1ac8cd65619 (diff)
downloadqemu-9c1f491e02a64882201d20fa8324884baee91fd8.zip
qemu-9c1f491e02a64882201d20fa8324884baee91fd8.tar.gz
qemu-9c1f491e02a64882201d20fa8324884baee91fd8.tar.bz2
docs/devel: update the container based tests
This section has grown a little stale so clean-up the language and examples for current usage: - refer to containers at the top - mention podman can also be used - add podman prerequisites section - move to using "docker-help" for online help - mention the registry and it's purpose - don't refer to out-of-date min-glib image Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210222101455.12640-6-alex.bennee@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/testing.rst61
1 files changed, 46 insertions, 15 deletions
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 488d4e3..e572604 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -280,13 +280,17 @@ Container based tests
Introduction
------------
-The Docker testing framework in QEMU utilizes public Docker images to build and
-test QEMU in predefined and widely accessible Linux environments. This makes
-it possible to expand the test coverage across distros, toolchain flavors and
-library versions.
-
-Prerequisites
--------------
+The container testing framework in QEMU utilizes public images to
+build and test QEMU in predefined and widely accessible Linux
+environments. This makes it possible to expand the test coverage
+across distros, toolchain flavors and library versions. The support
+was originally written for Docker although we also support Podman as
+an alternative container runtime. Although the many of the target
+names and scripts are prefixed with "docker" the system will
+automatically run on whichever is configured.
+
+Docker Prerequisites
+--------------------
Install "docker" with the system package manager and start the Docker service
on your development machine, then make sure you have the privilege to run
@@ -316,26 +320,53 @@ Note that any one of above configurations makes it possible for the user to
exploit the whole host with Docker bind mounting or other privileged
operations. So only do it on development machines.
+Podman Prerequisites
+--------------------
+
+Install "podman" with the system package manager.
+
+.. code::
+
+ $ sudo dnf install podman
+ $ podman ps
+
+The last command should print an empty table, to verify the system is ready.
+
Quickstart
----------
-From source tree, type ``make docker`` to see the help. Testing can be started
-without configuring or building QEMU (``configure`` and ``make`` are done in
-the container, with parameters defined by the make target):
+From source tree, type ``make docker-help`` to see the help. Testing
+can be started without configuring or building QEMU (``configure`` and
+``make`` are done in the container, with parameters defined by the
+make target):
.. code::
- make docker-test-build@min-glib
+ make docker-test-build@centos8
-This will create a container instance using the ``min-glib`` image (the image
+This will create a container instance using the ``centos8`` image (the image
is downloaded and initialized automatically), in which the ``test-build`` job
is executed.
+Registry
+--------
+
+The QEMU project has a container registry hosted by GitLab at
+``registry.gitlab.com/qemu-project/qemu`` which will automatically be
+used to pull in pre-built layers. This avoids unnecessary strain on
+the distro archives created by multiple developers running the same
+container build steps over and over again. This can be overridden
+locally by using the ``NOCACHE`` build option:
+
+.. code::
+
+ make docker-image-debian10 NOCACHE=1
+
Images
------
-Along with many other images, the ``min-glib`` image is defined in a Dockerfile
-in ``tests/docker/dockerfiles/``, called ``min-glib.docker``. ``make docker``
+Along with many other images, the ``centos8`` image is defined in a Dockerfile
+in ``tests/docker/dockerfiles/``, called ``centos8.docker``. ``make docker-help``
command will list all the available images.
To add a new image, simply create a new ``.docker`` file under the
@@ -355,7 +386,7 @@ QEMU. Docker tests are the executables under ``tests/docker`` named
library, ``tests/docker/common.rc``, which provides helpers to find the QEMU
source and build it.
-The full list of tests is printed in the ``make docker`` help.
+The full list of tests is printed in the ``make docker-help`` help.
Debugging a Docker test failure
-------------------------------