Import QEMU upstream snapshot d2e570c

Upstream: https://gitlab.com/qemu-project/qemu.git

Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
This commit is contained in:
Yaya48 committed 2026-08-31 02:15:30 +02:00
commit cf256aa081
11315 files changed
+3598369

No files matched your search

+120
View File
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import os
from subprocess import check_call
import sys
class TestLinters:
def test_flake8_pkg(self):
check_call([sys.executable, "-m", "flake8", "qemu/"])
def test_flake8_scripts(self):
check_call([sys.executable, "-m", "flake8", "scripts/"])
def test_flake8_qapi(self):
check_call(
[
sys.executable,
"-m",
"flake8",
"../scripts/qapi/",
"../docs/sphinx/qapidoc.py",
"../docs/sphinx/qapi_domain.py",
]
)
def test_isort_minikconf(self):
check_call([sys.executable, "-m", "isort", "-c", "../scripts/minikconf.py"])
def test_isort_pkg(self):
check_call([sys.executable, "-m", "isort", "-c", "qemu/"])
def test_isort_scripts(self):
check_call([sys.executable, "-m", "isort", "-c", "scripts/"])
def test_isort_qapi(self):
check_call(
[
sys.executable,
"-m",
"isort",
"--sp",
".",
"-c",
"../scripts/qapi/",
]
)
def test_isort_qapi_sphinx(self):
# Force isort to recognize 'compat' as a local module and not
# third-party
check_call(
[
sys.executable,
"-m",
"isort",
"--sp",
".",
"-c",
"-p",
"compat",
"../docs/sphinx/qapi_domain.py",
"../docs/sphinx/qapidoc.py",
]
)
def test_mypy_minikconf(self):
check_call([sys.executable, "-m", "mypy", "../scripts/minikconf.py"])
def test_mypy_pkg(self):
check_call([sys.executable, "-m", "mypy", "-p", "qemu"])
def test_mypy_scripts(self):
check_call([sys.executable, "-m", "mypy", "scripts/"])
def test_mypy_qapi(self):
check_call([sys.executable, "-m", "mypy", "../scripts/qapi"])
def test_mypy_iotests(self):
check_call(
[sys.executable, "-m", "linters", "--mypy"],
cwd="../tests/qemu-iotests/",
)
# Setuptools v60 introduced the SETUPTOOLS_USE_DISTUTILS=stdlib
# workaround; stdlib distutils was fully removed in Python
# 3.12+. Once we are on >=3.12+ exclusively, this workaround can be
# dropped safely. Until then, it is needed for some versions on
# Fedora/Debian distributions which relied upon distro-patched
# setuptools present in CPython, but not within setuptools itself.
def test_pylint_pkg(self):
os.environ["SETUPTOOLS_USE_DISTUTILS"] = "stdlib"
check_call([sys.executable, "-m", "pylint", "qemu/"])
def test_pylint_scripts(self):
os.environ["SETUPTOOLS_USE_DISTUTILS"] = "stdlib"
check_call([sys.executable, "-m", "pylint", "scripts/"])
def test_pylint_qapi(self):
os.environ["SETUPTOOLS_USE_DISTUTILS"] = "stdlib"
check_call(
[
sys.executable,
"-m",
"pylint",
"--rcfile=../scripts/qapi/pylintrc",
"../scripts/qapi/",
"../docs/sphinx/qapidoc.py",
"../docs/sphinx/qapi_domain.py",
]
)
def test_pylint_iotests(self):
os.environ["SETUPTOOLS_USE_DISTUTILS"] = "stdlib"
check_call(
[sys.executable, "-m", "linters", "--pylint"],
cwd="../tests/qemu-iotests/",
)
+77
View File
@@ -0,0 +1,77 @@
# This file lists the ***oldest possible dependencies*** needed to run
# "make check" successfully under ***Python 3.9***. It is used primarily
# by GitLab CI to ensure that our stated minimum versions in setup.cfg
# are truthful and regularly validated.
#
# This file should not contain any dependencies that are not expressed
# by the [devel] section of setup.cfg, except for transitive
# dependencies which must be enumerated here explicitly to eliminate
# dependency resolution ambiguity.
#
# When adding new dependencies, pin the very oldest non-yanked version
# on PyPI that allows the test suite to pass.
# For some reason, the presence of packaging==14.0 below requires us to
# also pin setuptools to version 70 or below. Otherwise, the
# installation of the QEMU package itself fails, failing to find
# setuptools.
setuptools<=70
wheel==0.34.2
# Dependencies for qapidoc/qapi_domain et al
sphinx==3.4.3
# Dependencies for qemu.machine
qemu.qmp==0.0.5
# Dependencies for mkvenv
distlib==0.3.6
# Dependencies for FUSE support for qom-fuse
fusepy==2.0.4
# Test-runners, utilities, etc.
pytest==6.0.2
# Linters
flake8==5.0.4
isort==5.6.0
mypy==1.4.0
pylint==2.17.3
# Transitive flake8 dependencies
mccabe==0.7.0
pycodestyle==2.9.1
pyflakes==2.5.0
# Transitive mypy dependencies
mypy-extensions==1.0.0
tomli==1.1.0
typing-extensions==4.7.1
# Transitive pylint dependencies
astroid==2.15.4
dill==0.2
lazy-object-proxy==1.4.0
platformdirs==2.2.0
toml==0.10.0
tomlkit==0.10.1
wrapt==1.14.0
# Transitive sphinx dependencies
Jinja2==2.7
MarkupSafe==1.1.0
alabaster==0.7.1
babel==1.3
docutils==0.12
imagesize==0.5.0
packaging==14.0
pytz==2011b0
requests==2.5.0
snowballstemmer==1.1
sphinxcontrib-applehelp==1.0.0
sphinxcontrib-devhelp==1.0.0
sphinxcontrib-htmlhelp==1.0.0
sphinxcontrib-jsmath==1.0.0
sphinxcontrib-qthelp==1.0.0
sphinxcontrib-serializinghtml==1.0.0