From patchwork Wed Feb 6 16:29:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1037621 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vn3t2d6nz9sLw for ; Thu, 7 Feb 2019 03:30:18 +1100 (AEDT) Received: from localhost ([127.0.0.1]:53455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grQ5X-0005Yt-P3 for incoming@patchwork.ozlabs.org; Wed, 06 Feb 2019 11:30:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grQ4u-0005SB-Dq for qemu-devel@nongnu.org; Wed, 06 Feb 2019 11:29:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grQ4s-0000Je-EZ for qemu-devel@nongnu.org; Wed, 06 Feb 2019 11:29:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41774) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grQ4l-0000DK-FA; Wed, 06 Feb 2019 11:29:27 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 57237369CD; Wed, 6 Feb 2019 16:29:17 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-41.rdu2.redhat.com [10.10.120.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21F737C815; Wed, 6 Feb 2019 16:29:02 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 11:29:00 -0500 Message-Id: <20190206162901.19082-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 06 Feb 2019 16:29:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 0/1] Introduce a Python module structure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Cleber Rosa , Markus Armbruster , Wainer dos Santos Moschetta , Max Reitz , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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