From: Saul Wold Date: Tue, 29 Jun 2021 14:57:01 +0000 (-0700) Subject: oeqa/qemurunner: add support qmp cmd args X-Git-Tag: uninative-3.3~328 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=4d34676b6226a34df2877adbeea25abb5b2a31be;p=openembedded-core.git oeqa/qemurunner: add support qmp cmd args This will enable passing arguments to qmp commands for those that require additional information Signed-off-by: Saul Wold Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index c7f7860317..10c54d6afa 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -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