]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/qemurunner: add support qmp cmd args
authorSaul Wold <Saul.Wold@windriver.com>
Tue, 29 Jun 2021 14:57:01 +0000 (07:57 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Jul 2021 22:14:27 +0000 (23:14 +0100)
This will enable passing arguments to qmp commands for
those that require additional information

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index c7f7860317912d8ae9651ecfe09a841d57347967..10c54d6afab92aa50f09c5990f84850f9be61707 100644 (file)
@@ -602,8 +602,12 @@ class QemuRunner:
                         return True
         return False
 
-    def run_monitor(self, command, timeout=60):
-        return self.qmp.cmd(command)
+    def run_monitor(self, command, args=None, timeout=60):
+        if hasattr(self, 'qmp') and self.qmp:
+            if args is not None:
+                return self.qmp.cmd(command, args)
+            else:
+                return self.qmp.cmd(command)
 
     def run_serial(self, command, raw=False, timeout=60):
         # We assume target system have echo to get command status