[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 14/15] python: Add iotest linters to test suite
From: |
John Snow |
Subject: |
[PATCH v2 14/15] python: Add iotest linters to test suite |
Date: |
Tue, 19 Oct 2021 10:49:17 -0400 |
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>
---
python/tests/iotests-mypy.sh | 4 ++++
python/tests/iotests-pylint.sh | 4 ++++
2 files changed, 8 insertions(+)
create mode 100755 python/tests/iotests-mypy.sh
create mode 100755 python/tests/iotests-pylint.sh
diff --git a/python/tests/iotests-mypy.sh b/python/tests/iotests-mypy.sh
new file mode 100755
index 00000000000..ee764708199
--- /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 00000000000..4cae03424b4
--- /dev/null
+++ b/python/tests/iotests-pylint.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+cd ../tests/qemu-iotests/
+python3 -m linters --pylint
--
2.31.1
- [PATCH v2 02/15] iotests/297: Split mypy configuration out into mypy.ini, (continued)
- [PATCH v2 02/15] iotests/297: Split mypy configuration out into mypy.ini, John Snow, 2021/10/19
- [PATCH v2 04/15] iotests/297: Create main() function, John Snow, 2021/10/19
- [PATCH v2 01/15] iotests/297: Move pylint config into pylintrc, John Snow, 2021/10/19
- [PATCH v2 03/15] iotests/297: Add get_files() function, John Snow, 2021/10/19
- [PATCH v2 05/15] iotests/297: Don't rely on distro-specific linter binaries, John Snow, 2021/10/19
- [PATCH v2 08/15] iotests/297: Change run_linter() to raise an exception on failure, John Snow, 2021/10/19
- [PATCH v2 07/15] iotests/297: refactor run_[mypy|pylint] as generic execution shim, John Snow, 2021/10/19
- [PATCH v2 14/15] python: Add iotest linters to test suite,
John Snow <=
- [PATCH v2 06/15] iotests/297: Split run_linters apart into run_pylint and run_mypy, John Snow, 2021/10/19
- [PATCH v2 09/15] iotests/297: update tool availability checks, John Snow, 2021/10/19
- [PATCH v2 13/15] iotests/linters: Add workaround for mypy bug #9852, John Snow, 2021/10/19
- [PATCH v2 10/15] iotests/297: split test into sub-cases, John Snow, 2021/10/19
- [PATCH v2 11/15] iotests: split linters.py out from 297, John Snow, 2021/10/19