-
- Downloads
tests: Use separate virtual environment for avocado
This reverts commits eea2d141 ("Makefile: remove $(TESTS_PYTHON)", 2023-05-26) and 9c6692db ("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>
Showing
- .gitlab-ci.d/buildtest.yml 3 additions, 3 deletions.gitlab-ci.d/buildtest.yml
- docs/devel/acpi-bits.rst 3 additions, 3 deletionsdocs/devel/acpi-bits.rst
- docs/devel/testing.rst 7 additions, 7 deletionsdocs/devel/testing.rst
- scripts/ci/org.centos/stream/8/x86_64/test-avocado 2 additions, 2 deletionsscripts/ci/org.centos/stream/8/x86_64/test-avocado
- scripts/device-crash-test 1 addition, 1 deletionscripts/device-crash-test
- tests/Makefile.include 9 additions, 7 deletionstests/Makefile.include
- tests/requirements.txt 2 additions, 5 deletionstests/requirements.txt
- tests/vm/Makefile.include 1 addition, 1 deletiontests/vm/Makefile.include
Loading
-
mentioned in commit d646a2a1
-
mentioned in commit bc2599d1
-
mentioned in commit da527ed3
-
mentioned in commit 2d6dfb89
-
mentioned in commit a6c4e0ce
-
mentioned in commit 0ceee585
-
mentioned in commit c5ac4b48
-
mentioned in commit aadc18ee
-
mentioned in commit 5b9d3d8a
-
mentioned in commit 587ef200
-
mentioned in commit 6d213179
-
mentioned in commit c03f57fd
Please register or sign in to comment