From 879545999f6277bd441415a0a3815ff57fc004d3 Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Tue, 29 Jun 2021 07:57:01 -0700 Subject: oeqa/qemurunner: add support qmp cmd args This will enable passing arguments to qmp commands for those that require additional information (From OE-Core rev: 4d34676b6226a34df2877adbeea25abb5b2a31be) Signed-off-by: Saul Wold Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/qemurunner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3-54-g00ecf