diff options
author | Enrico Jörns <ejo@pengutronix.de> | 2023-03-31 12:26:22 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-31 23:30:36 +0100 |
commit | d59756912cd450b0af3d8893b822c66dafe42544 (patch) | |
tree | f3e36f71bb14de19619d05200feb337282996fa8 /meta/lib/oeqa/utils/qemurunner.py | |
parent | 4651c42cabd3c3a165589d2a7f1d26f41e81a0b8 (diff) | |
download | poky-d59756912cd450b0af3d8893b822c66dafe42544.tar.gz |
oeqa: whitespace and indentation cleanups
(From OE-Core rev: 4922221d1259e2f78233f17bb901cdac5b9aa520)
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index c6e4a34bce..6734cee48d 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -238,7 +238,7 @@ class QemuRunner: | |||
238 | self.origchldhandler = signal.getsignal(signal.SIGCHLD) | 238 | self.origchldhandler = signal.getsignal(signal.SIGCHLD) |
239 | signal.signal(signal.SIGCHLD, self.handleSIGCHLD) | 239 | signal.signal(signal.SIGCHLD, self.handleSIGCHLD) |
240 | 240 | ||
241 | self.logger.debug('launchcmd=%s'%(launch_cmd)) | 241 | self.logger.debug('launchcmd=%s' % (launch_cmd)) |
242 | 242 | ||
243 | # FIXME: We pass in stdin=subprocess.PIPE here to work around stty | 243 | # FIXME: We pass in stdin=subprocess.PIPE here to work around stty |
244 | # blocking at the end of the runqemu script when using this within | 244 | # blocking at the end of the runqemu script when using this within |
@@ -332,8 +332,8 @@ class QemuRunner: | |||
332 | try: | 332 | try: |
333 | os.chdir(os.path.dirname(qmp_port)) | 333 | os.chdir(os.path.dirname(qmp_port)) |
334 | try: | 334 | try: |
335 | from qmp.legacy import QEMUMonitorProtocol | 335 | from qmp.legacy import QEMUMonitorProtocol |
336 | self.qmp = QEMUMonitorProtocol(os.path.basename(qmp_port)) | 336 | self.qmp = QEMUMonitorProtocol(os.path.basename(qmp_port)) |
337 | except OSError as msg: | 337 | except OSError as msg: |
338 | self.logger.warning("Failed to initialize qemu monitor socket: %s File: %s" % (msg, msg.filename)) | 338 | self.logger.warning("Failed to initialize qemu monitor socket: %s File: %s" % (msg, msg.filename)) |
339 | return False | 339 | return False |
@@ -343,8 +343,8 @@ class QemuRunner: | |||
343 | self.logger.debug("QMP Port does not exist waiting for it to be created") | 343 | self.logger.debug("QMP Port does not exist waiting for it to be created") |
344 | endtime = time.time() + self.runqemutime | 344 | endtime = time.time() + self.runqemutime |
345 | while not os.path.exists(qmp_port) and self.is_alive() and time.time() < endtime: | 345 | while not os.path.exists(qmp_port) and self.is_alive() and time.time() < endtime: |
346 | self.logger.info("QMP port does not exist yet!") | 346 | self.logger.info("QMP port does not exist yet!") |
347 | time.sleep(0.5) | 347 | time.sleep(0.5) |
348 | if not os.path.exists(qmp_port) and self.is_alive(): | 348 | if not os.path.exists(qmp_port) and self.is_alive(): |
349 | self.logger.warning("QMP Port still does not exist but QEMU is alive") | 349 | self.logger.warning("QMP Port still does not exist but QEMU is alive") |
350 | return False | 350 | return False |
@@ -419,7 +419,7 @@ class QemuRunner: | |||
419 | except (IndexError, ValueError): | 419 | except (IndexError, ValueError): |
420 | # Try to get network configuration from runqemu output | 420 | # Try to get network configuration from runqemu output |
421 | match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+).*', | 421 | match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+).*', |
422 | out, re.MULTILINE|re.DOTALL) | 422 | out, re.MULTILINE | re.DOTALL) |
423 | if match: | 423 | if match: |
424 | self.ip, self.server_ip, self.netmask = match.groups() | 424 | self.ip, self.server_ip, self.netmask = match.groups() |
425 | # network configuration is required as we couldn't get it | 425 | # network configuration is required as we couldn't get it |
@@ -548,7 +548,7 @@ class QemuRunner: | |||
548 | if e.errno != errno.ESRCH: | 548 | if e.errno != errno.ESRCH: |
549 | raise | 549 | raise |
550 | try: | 550 | try: |
551 | outs, errs = self.runqemu.communicate(timeout = self.runqemutime) | 551 | outs, errs = self.runqemu.communicate(timeout=self.runqemutime) |
552 | if outs: | 552 | if outs: |
553 | self.logger.info("Output from runqemu:\n%s", outs.decode("utf-8")) | 553 | self.logger.info("Output from runqemu:\n%s", outs.decode("utf-8")) |
554 | if errs: | 554 | if errs: |