[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/23] python: Configure tox to skip missing interpreters
From: |
Cleber Rosa |
Subject: |
[PULL 20/23] python: Configure tox to skip missing interpreters |
Date: |
Tue, 13 Jul 2021 17:19:20 -0400 |
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
Currently tox tests against the installed interpreters, however if any
supported interpreter is absent then it will return fail. It seems not
reasonable to expect developers to have all supported interpreters
installed on their systems. Luckily tox can be configured to skip
missing interpreters.
This changed the tox setup so that missing interpreters are skipped by
default. On the CI, however, we still want to enforce it tests
against all supported. This way on CI the
--skip-missing-interpreters=false option is passed to tox.
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210630184546.456582-1-wainersm@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
.gitlab-ci.d/static_checks.yml | 1 +
python/Makefile | 5 ++++-
python/setup.cfg | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
index b01f6ec231..96dbd9e310 100644
--- a/.gitlab-ci.d/static_checks.yml
+++ b/.gitlab-ci.d/static_checks.yml
@@ -43,6 +43,7 @@ check-python-tox:
- make -C python check-tox
variables:
GIT_DEPTH: 1
+ QEMU_TOX_EXTRA_ARGS: --skip-missing-interpreters=false
needs:
job: python-container
allow_failure: true
diff --git a/python/Makefile b/python/Makefile
index ac46ae33e7..fe27a3e12e 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -1,4 +1,5 @@
QEMU_VENV_DIR=.dev-venv
+QEMU_TOX_EXTRA_ARGS ?=
.PHONY: help
help:
@@ -15,6 +16,8 @@ help:
@echo " These tests use the newest dependencies."
@echo " Requires: Python 3.6 - 3.10, and tox."
@echo " Hint (Fedora): 'sudo dnf install python3-tox python3.10'"
+ @echo " The variable QEMU_TOX_EXTRA_ARGS can be use to pass extra"
+ @echo " arguments to tox".
@echo ""
@echo "make check-dev:"
@echo " Run tests in a venv against your default python3 version."
@@ -87,7 +90,7 @@ check:
.PHONY: check-tox
check-tox:
- @tox
+ @tox $(QEMU_TOX_EXTRA_ARGS)
.PHONY: clean
clean:
diff --git a/python/setup.cfg b/python/setup.cfg
index 11f71d5312..14bab90288 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -121,6 +121,7 @@ multi_line_output=3
[tox:tox]
envlist = py36, py37, py38, py39, py310
+skip_missing_interpreters = true
[testenv]
allowlist_externals = make
--
2.31.1
- [PULL 10/23] avocado_qemu: Add SMMUv3 tests, (continued)
- [PULL 10/23] avocado_qemu: Add SMMUv3 tests, Cleber Rosa, 2021/07/13
- [PULL 11/23] avocado_qemu: Add Intel iommu tests, Cleber Rosa, 2021/07/13
- [PULL 12/23] tests/acceptance: Tag NetBSD tests as 'os:netbsd', Cleber Rosa, 2021/07/13
- [PULL 13/23] tests/acceptance: Automatic set -cpu to the test vm, Cleber Rosa, 2021/07/13
- [PULL 14/23] tests/acceptance: Fix mismatch on cpu tagged tests, Cleber Rosa, 2021/07/13
- [PULL 16/23] tests/acceptance: Tagging tests with "cpu:VALUE", Cleber Rosa, 2021/07/13
- [PULL 15/23] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests, Cleber Rosa, 2021/07/13
- [PULL 17/23] python/qemu: Add args property to the QEMUMachine class, Cleber Rosa, 2021/07/13
- [PULL 19/23] tests/acceptance: Handle cpu tag on x86_cpu_model_versions tests, Cleber Rosa, 2021/07/13
- [PULL 18/23] tests/acceptance: Add set_vm_arg() to the Test class, Cleber Rosa, 2021/07/13
- [PULL 20/23] python: Configure tox to skip missing interpreters,
Cleber Rosa <=
- [PULL 21/23] Acceptance tests: do not try to reuse packages from the system, Cleber Rosa, 2021/07/13
- [PULL 23/23] tests/acceptance/cpu_queries.py: use the proper logging channels, Cleber Rosa, 2021/07/13
- [PULL 22/23] tests/acceptance/linux_ssh_mips_malta.py: drop identical setUp, Cleber Rosa, 2021/07/13
- Re: [PULL 00/23] Python and Acceptance Tests, Peter Maydell, 2021/07/14