aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta <wainersm@redhat.com>2021-06-30 15:45:46 -0300
committerCleber Rosa <crosa@redhat.com>2021-07-13 15:44:16 -0400
commit6f651a6d84b64060aa77373a72ba02ff61ad9911 (patch)
tree7c41447d09a44f94379cd9cedfb332004d78e1f7 /python
parent3843a32152a54092f1fc2c8eb54a03da64ad4c6d (diff)
downloadqemu-6f651a6d84b64060aa77373a72ba02ff61ad9911.zip
qemu-6f651a6d84b64060aa77373a72ba02ff61ad9911.tar.gz
qemu-6f651a6d84b64060aa77373a72ba02ff61ad9911.tar.bz2
python: Configure tox to skip missing interpreters
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>
Diffstat (limited to 'python')
-rw-r--r--python/Makefile5
-rw-r--r--python/setup.cfg1
2 files changed, 5 insertions, 1 deletions
diff --git a/python/Makefile b/python/Makefile
index ac46ae3..fe27a3e 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 11f71d5..14bab90 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