[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 7/9] qtest.py: Make 'binary' parameter optional

From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 7/9] qtest.py: Make 'binary' parameter optional
Date: Mon, 16 Jan 2017 23:02:02 -0200

If the 'binary' parameter is omitted, use the $QTEST_QEMU_BINARY
environment variable.

Signed-off-by: Eduardo Habkost <address@hidden>
Patch originally submitted as part of series:
* [RFC v2 00/20] qmp: Report bus information on 'query-machines'
 scripts/qtest.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/qtest.py b/scripts/qtest.py
index 0496490906..5a37b48143 100644
--- a/scripts/qtest.py
+++ b/scripts/qtest.py
@@ -79,8 +79,10 @@ class QEMUQtestProtocol(object):
 class QEMUQtestMachine(qemu.QEMUMachine):
     '''A QEMU VM'''
-    def __init__(self, binary, args=[], name=None, test_dir="/var/tmp",
+    def __init__(self, binary=None, args=[], name=None, test_dir="/var/tmp",
                  socket_scm_helper=None, logging=True):
+        if binary is None:
+            binary = os.getenv('QTEST_QEMU_BINARY')
         if name is None:
             name = "qemu-%d" % os.getpid()
         super(QEMUQtestMachine, self).__init__(binary, args, name=name, 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]