qemu/.gitlab-ci.d
Paolo Bonzini e8e4298fea tests: Use separate virtual environment for avocado
This reverts commits eea2d14117 ("Makefile: remove $(TESTS_PYTHON)",
2023-05-26) and 9c6692db55 ("tests: Use configure-provided pyvenv for
tests", 2023-05-18).

Right now, there is a conflict between wanting a ">=" constraint when
using a distro-provided package and wanting a "==" constraint when
installing Avocado from PyPI; this would provide the best of both worlds
in terms of resiliency for both distros that have required packages and
distros that don't.

The conflict is visible also for meson, where we would like to install
the latest 0.63.x version but also accept a distro 1.1.x version.
But it is worse for avocado, for two reasons:

1) we cannot use an "==" constraint to install avocado if the venv
includes a system avocado.  The distro will package plugins that have
"==" constraints on the version that is included in the distro, and, using
"pip install avocado==88.1" on a venv that includes system packages will
result in this error:

   ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
   avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
   avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
   make[1]: Leaving directory '/home/berrange/src/virt/qemu/build'

2) we cannot use ">=" either if the venv does _not_ include a system
avocado, because that would result in the installation of v101.0 which
is the one we've just reverted.

So the idea is to encode the dependencies as an (acceptable, locked)
tuple, like this hypothetical TOML that would be committed inside
python/ and used by mkvenv.py:

  [meson]
  meson = { minimum = "0.63.0", install = "0.63.3", canary = "meson" }

  [docs]
  # 6.0 drops support for Python 3.7
  sphinx = { minimum = "1.6", install = "<6.0", canary = "sphinx-build" }
  sphinx_rtd_theme = { minimum = "0.5" }

  [avocado]
  avocado-framework = { minimum = "88.1", install = "88.1", canary = "avocado" }

Once this is implemented, it would also be possible to install avocado in
pyvenv/ using "mkvenv.py ensure", thus using the distro package on Fedora
and CentOS Stream (the only distros where it's available).  But until
this is implemented, keep avocado in a separate venv.  There is still the
benefit of using a single python for meson custom_targets and for sphinx.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-06-06 16:29:53 +02:00
..
cirrus tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies 2023-05-16 09:14:18 +02:00
custom-runners gitlab: enable minimal device profile for aarch64 --disable-tcg 2023-05-10 16:02:06 +01:00
opensbi gitlab/opensbi: Move to docker:stable 2023-03-05 15:40:00 -08:00
base.yml gitlab: fix typo 2023-04-04 15:56:44 +01:00
buildtest-template.yml remove remaining traces of meson submodule 2023-05-19 20:09:21 +02:00
buildtest.yml tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
check-dco.py gitlab: add a CI job to validate the DCO sign off 2020-10-13 12:48:17 +02:00
check-patch.py .gitlab-ci.d/check-patch: tweak output for CI logs 2020-11-16 11:08:40 +00:00
cirrus.yml .gitlab-ci.d/cirrus: Drop the CI job for compiling with FreeBSD 12 2023-04-27 14:58:23 +01:00
container-core.yml tests/docker: remove the Debian base images 2022-09-20 17:22:08 +01:00
container-cross.yml tests/docker: use prebuilt toolchain for debian-hexagon-cross 2022-12-23 15:16:31 +00:00
container-template.yml gitlab: switch from 'stable' to 'latest' docker container tags 2023-05-31 10:29:14 -07:00
containers.yml testing: update ubuntu2004 to ubuntu2204 2023-03-01 10:31:46 +00:00
crossbuild-template.yml tests: ensure we export job results for some cross builds 2023-03-01 10:32:16 +00:00
crossbuilds.yml gitlab-ci.d/crossbuilds: Drop the 32-bit arm system emulation jobs 2023-03-08 08:57:42 +01:00
custom-runners.yml gitlab: custom-runners: preserve more artifacts for debugging 2023-05-19 20:40:29 +02:00
opensbi.yml gitlab: switch from 'stable' to 'latest' docker container tags 2023-05-31 10:29:14 -07:00
qemu-project.yml Add CI variable RUNNER_TAG 2023-05-24 12:26:40 -07:00
stages.yml gitlab: drop 'containers-layer2' stage 2022-07-29 09:48:01 +01:00
static_checks.yml python: drop pipenv 2023-02-22 23:35:03 -05:00
windows.yml gitlab-ci: Cover SPICE in the MSYS2 job 2023-03-24 12:04:06 +01:00