[Qemu-devel] [PATCH 0/1] Introduce a Python module structure

Cleber Rosa posted 1 patch 6 years, 9 months ago
Test docker-mingw@fedora passed
Test asan passed
Test checkpatch passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190206162901.19082-1-crosa@redhat.com
Maintainers: "Philippe Mathieu-Daudé" <philmd@redhat.com>, Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Markus Armbruster <armbru@redhat.com>, Fam Zheng <fam@euphon.net>, "Alex Bennée" <alex.bennee@linaro.org>, Cleber Rosa <crosa@redhat.com>
configure                                  |  1 +
scripts/qemu.py => python/qemu/__init__.py | 11 ++++++-----
{scripts/qmp => python/qemu}/qmp.py        |  0
{scripts => python/qemu}/qtest.py          |  5 +++--
scripts/device-crash-test                  |  2 ++
scripts/qmp/__init__.py                    |  0
scripts/qmp/qemu-ga-client                 |  5 ++++-
scripts/qmp/qmp-shell                      |  4 +++-
scripts/render_block_graph.py              |  2 ++
tests/acceptance/avocado_qemu/__init__.py  |  5 ++---
tests/acceptance/virtio_version.py         |  2 +-
tests/migration/guestperf/engine.py        |  7 ++++---
tests/qemu-iotests/235                     |  2 +-
tests/qemu-iotests/238                     |  2 +-
tests/qemu-iotests/iotests.py              |  4 ++--
tests/vm/basevm.py                         |  2 +-
16 files changed, 33 insertions(+), 21 deletions(-)
rename scripts/qemu.py => python/qemu/__init__.py (98%)
rename {scripts/qmp => python/qemu}/qmp.py (100%)
rename {scripts => python/qemu}/qtest.py (98%)
delete mode 100644 scripts/qmp/__init__.py
[Qemu-devel] [PATCH 0/1] Introduce a Python module structure
Posted by Cleber Rosa 6 years, 9 months ago
The amount of Python code that is being reused by a now large number
of different scripts and tests on QEMU urges for a better structure.

This addresses the feedback received on a previous RFC[1], but further
changes that will really benefit from this change were not attempted
here.  Once, the module structure is present, I myself have plans to
send some unittests to "QEMUMachine", to some parts of "qemu.qmp", and
others.

Documentation, lint and style checkers are other possible candidates.

[1] - https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05478.html

---

Git Info:
  - URI: https://github.com/clebergnu/qemu/tree/sent/python_module
  - Remote: https://github.com/clebergnu/qemu
  - Branch: sent/python_module

Travis CI Info:
  - Job: https://travis-ci.org/clebergnu/qemu/builds/489616874

Cleber Rosa (1):
  Introduce a Python module structure

 configure                                  |  1 +
 scripts/qemu.py => python/qemu/__init__.py | 11 ++++++-----
 {scripts/qmp => python/qemu}/qmp.py        |  0
 {scripts => python/qemu}/qtest.py          |  5 +++--
 scripts/device-crash-test                  |  2 ++
 scripts/qmp/__init__.py                    |  0
 scripts/qmp/qemu-ga-client                 |  5 ++++-
 scripts/qmp/qmp-shell                      |  4 +++-
 scripts/render_block_graph.py              |  2 ++
 tests/acceptance/avocado_qemu/__init__.py  |  5 ++---
 tests/acceptance/virtio_version.py         |  2 +-
 tests/migration/guestperf/engine.py        |  7 ++++---
 tests/qemu-iotests/235                     |  2 +-
 tests/qemu-iotests/238                     |  2 +-
 tests/qemu-iotests/iotests.py              |  4 ++--
 tests/vm/basevm.py                         |  2 +-
 16 files changed, 33 insertions(+), 21 deletions(-)
 rename scripts/qemu.py => python/qemu/__init__.py (98%)
 rename {scripts/qmp => python/qemu}/qmp.py (100%)
 rename {scripts => python/qemu}/qtest.py (98%)
 delete mode 100644 scripts/qmp/__init__.py

-- 
2.20.1