1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-04 02:00:04 +00:00

oeqa qemurunner: read more data at a time from serial

Use a short sleep to bundle serial console reads so that
we are not reading one character at a time which reduces busy
looping.

(From OE-Core rev: 62df87d3544b7fc3717743b131a62c6092359ec5)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit cafe65d8cf7544edbd387f7f5f6d77c64c6b18fa)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mikko Rapeli
2023-02-09 10:09:33 +02:00
committed by Richard Purdie
parent f3437cb740
commit d0ae99feb8
+2
View File
@@ -463,6 +463,8 @@ class QemuRunner:
socklist.remove(self.server_socket) socklist.remove(self.server_socket)
self.logger.debug("Connection from %s:%s" % addr) self.logger.debug("Connection from %s:%s" % addr)
else: else:
# try to avoid reading only a single character at a time
time.sleep(0.1)
data = data + sock.recv(1024) data = data + sock.recv(1024)
if data: if data:
bootlog += data bootlog += data