]> git.proxmox.com Git - mirror_qemu.git/commit
iotests/297: Rewrite in Python and extend reach
authorMax Reitz <mreitz@redhat.com>
Mon, 18 Jan 2021 10:57:12 +0000 (11:57 +0100)
committerMax Reitz <mreitz@redhat.com>
Tue, 26 Jan 2021 13:36:37 +0000 (14:36 +0100)
commit59aec869822c02cfd0c929b48bfdc6da99cd1665
tree98ef8f29fc2c2fc2bfeda90af3099e43dfab09b8
parent3e0105e0590d74e8deaf9a52a0009334e0bbe74f
iotests/297: Rewrite in Python and extend reach

Instead of checking iotests.py only, check all Python files in the
qemu-iotests/ directory.  Of course, most of them do not pass, so there
is an extensive skip list for now.  (The only files that do pass are
209, 254, 283, and iotests.py.)

(Alternatively, we could have the opposite, i.e. an explicit list of
files that we do want to check, but I think it is better to check files
by default.)

Unless started in debug mode (./check -d), the output has no information
on which files are tested, so we will not have a problem e.g. with
backports, where some files may be missing when compared to upstream.

Besides the technical rewrite, some more things are changed:

- For the pylint invocation, PYTHONPATH is adjusted.  This mirrors
  setting MYPYPATH for mypy.

- Also, MYPYPATH is now derived from PYTHONPATH, so that we include
  paths set by the environment.  Maybe at some point we want to let the
  check script add '../../python/' to PYTHONPATH so that iotests.py does
  not need to do that.

- Passing --notes=FIXME,XXX to pylint suppresses warnings for TODO
  comments.  TODO is fine, we do not need 297 to complain about such
  comments.

- The "Success" line from mypy's output is suppressed, because (A) it
  does not add useful information, and (B) it would leak information
  about the files having been tested to the reference output, which we
  decidedly do not want.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210118105720.14824-3-mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
tests/qemu-iotests/297
tests/qemu-iotests/297.out