summaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorJohn Snow2021-10-19 16:49:17 +0200
committerJohn Snow2021-11-01 16:54:59 +0100
commit461044ceb4fe58eb919dedfeb62f619f79d4d552 (patch)
treea889e02bdafe0d85cd88678c2a5032dc907921a4 /python/tests
parentiotests/linters: Add workaround for mypy bug #9852 (diff)
downloadqemu-461044ceb4fe58eb919dedfeb62f619f79d4d552.tar.gz
qemu-461044ceb4fe58eb919dedfeb62f619f79d4d552.tar.xz
qemu-461044ceb4fe58eb919dedfeb62f619f79d4d552.zip
python: Add iotest linters to test suite
Run mypy and pylint on the iotests files directly from the Python CI test infrastructure. This ensures that any accidental breakages to the qemu.[qmp|aqmp|machine|utils] packages will be caught by that test suite. It also ensures that these linters are run with well-known versions and test against a wide variety of python versions, which helps to find accidental cross-version python compatibility issues. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-id: 20211019144918.3159078-15-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/tests')
-rwxr-xr-xpython/tests/iotests-mypy.sh4
-rwxr-xr-xpython/tests/iotests-pylint.sh4
2 files changed, 8 insertions, 0 deletions
diff --git a/python/tests/iotests-mypy.sh b/python/tests/iotests-mypy.sh
new file mode 100755
index 0000000000..ee76470819
--- /dev/null
+++ b/python/tests/iotests-mypy.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+cd ../tests/qemu-iotests/
+python3 -m linters --mypy
diff --git a/python/tests/iotests-pylint.sh b/python/tests/iotests-pylint.sh
new file mode 100755
index 0000000000..4cae03424b
--- /dev/null
+++ b/python/tests/iotests-pylint.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+cd ../tests/qemu-iotests/
+python3 -m linters --pylint