[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/22] python: Add iotest linters to test suite
From: |
John Snow |
Subject: |
[PULL 14/22] python: Add iotest linters to test suite |
Date: |
Mon, 1 Nov 2021 13:29:58 -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>
Message-id: 20211019144918.3159078-15-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@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
- [PULL 04/22] iotests/297: Create main() function, (continued)
- [PULL 04/22] iotests/297: Create main() function, John Snow, 2021/11/01
- [PULL 05/22] iotests/297: Don't rely on distro-specific linter binaries, John Snow, 2021/11/01
- [PULL 06/22] iotests/297: Split run_linters apart into run_pylint and run_mypy, John Snow, 2021/11/01
- [PULL 07/22] iotests/297: refactor run_[mypy|pylint] as generic execution shim, John Snow, 2021/11/01
- [PULL 08/22] iotests/297: Change run_linter() to raise an exception on failure, John Snow, 2021/11/01
- [PULL 09/22] iotests/297: update tool availability checks, John Snow, 2021/11/01
- [PULL 10/22] iotests/297: split test into sub-cases, John Snow, 2021/11/01
- [PULL 11/22] iotests: split linters.py out from 297, John Snow, 2021/11/01
- [PULL 12/22] iotests/linters: Add entry point for linting via Python CI, John Snow, 2021/11/01
- [PULL 13/22] iotests/linters: Add workaround for mypy bug #9852, John Snow, 2021/11/01
- [PULL 14/22] python: Add iotest linters to test suite,
John Snow <=
- [PULL 15/22] python/machine: remove has_quit argument, John Snow, 2021/11/01
- [PULL 16/22] python/machine: Handle QMP errors on close more meticulously, John Snow, 2021/11/01
- [PULL 17/22] python/aqmp: Remove scary message, John Snow, 2021/11/01
- [PULL 18/22] iotests: Accommodate async QMP Exception classes, John Snow, 2021/11/01
- [PULL 19/22] iotests: Conditionally silence certain AQMP errors, John Snow, 2021/11/01
- [PULL 20/22] iotests/300: avoid abnormal shutdown race condition, John Snow, 2021/11/01
- [PULL 21/22] python/aqmp: Create sync QMP wrapper for iotests, John Snow, 2021/11/01
- [PULL 22/22] python, iotests: replace qmp with aqmp, John Snow, 2021/11/01