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: 10799585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 656C2922 for ; Wed, 6 Feb 2019 16:30:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56F392CC20 for ; Wed, 6 Feb 2019 16:30:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A84A2CC2A; Wed, 6 Feb 2019 16:30:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 28ABD2CC20 for ; Wed, 6 Feb 2019 16:30:38 +0000 (UTC) Received: from localhost ([127.0.0.1]:53491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grQ5t-0006FS-EO for patchwork-qemu-devel@patchwork.kernel.org; Wed, 06 Feb 2019 11:30:37 -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?Phi?= =?utf-8?q?lippe_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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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