mbox series

[RFC,0/2] python: integrate linter tests natively with meson

Message ID 20250224191152.2123003-1-berrange@redhat.com (mailing list archive)
Headers show
Series python: integrate linter tests natively with meson | expand

Message

Daniel P. Berrangé Feb. 24, 2025, 7:11 p.m. UTC
It seems everytime I post some new patches which touch python code I
end up forgetting to run the extra non-default 'make check' target from
the python/ subdir.

IMHO, if we're going to pick up on linter failures in review feedback
(which is a reasonable thing to want to do), then we should be running
these linters by default in 'make check'.

This RFC is demonstrating a possible strategy to achieve that, by making
the python tests use meson in the same way as everything else, instead
of being stuck in the old 'make' world. In keeping with our work to
remove use of avocado for functional testing, this also removes avocado
for python linters since IMHO it adds no notable value over what meson
provides already.

See last patch for the interesting stuff, and the various caveats about
this initial PoC.

Being a PoC this is minimally tested beyond 'make check' on my local
machine.

Daniel P. Berrangé (2):
  python: be more selective in hiding mypy subclassing warning
  python: integrate linter tests natively with meson

 meson.build                   |  1 +
 python/meson.build            | 43 +++++++++++++++++++++++++++++++++++
 python/qemu/qmp/qmp_tui.py    | 12 +++++-----
 python/qemu/utils/qom_fuse.py |  2 +-
 python/scripts/__init__.py    |  0
 python/setup.cfg              |  8 -------
 scripts/meson.build           |  9 ++++++++
 tests/meson.build             |  1 +
 tests/python/meson.build      | 17 ++++++++++++++
 9 files changed, 78 insertions(+), 15 deletions(-)
 create mode 100644 python/meson.build
 create mode 100644 python/scripts/__init__.py
 create mode 100644 tests/python/meson.build