mirror of
https://git.yoctoproject.org/poky
synced 2026-02-12 11:43:04 +01: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: cafe65d8cf7544edbd387f7f5f6d77c64c6b18fa) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
49da864246
commit
d61df4b220
@@ -202,7 +202,7 @@ class QemuRunner:
|
||||
qmp_file = "." + next(tempfile._get_candidate_names())
|
||||
qmp_param = ' -S -qmp unix:./%s,server,wait' % (qmp_file)
|
||||
qmp_port = self.tmpdir + "/" + qmp_file
|
||||
# Create a second socket connection for debugging use,
|
||||
# Create a second socket connection for debugging use,
|
||||
# note this will NOT cause qemu to block waiting for the connection
|
||||
qmp_file2 = "." + next(tempfile._get_candidate_names())
|
||||
qmp_param += ' -qmp unix:./%s,server,nowait' % (qmp_file2)
|
||||
@@ -468,6 +468,8 @@ class QemuRunner:
|
||||
socklist.remove(self.server_socket)
|
||||
self.logger.debug("Connection from %s:%s" % addr)
|
||||
else:
|
||||
# try to avoid reading only a single character at a time
|
||||
time.sleep(0.1)
|
||||
data = data + sock.recv(1024)
|
||||
if data:
|
||||
bootlog += data
|
||||
|
||||
Reference in New Issue
Block a user