summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-02-09 10:09:36 +0200
committerSteve Sakoman <steve@sakoman.com>2023-02-18 06:41:49 -1000
commitab1e3000cee9f5f3496a7e67cc59b2e08a681a89 (patch)
treedd5f4eb4193babb314901aa4c5ae21e1fb6c4bcb
parentcd6bb88d98b1dc8d751cf75b9ddcca39c84738c6 (diff)
downloadopenembedded-core-ab1e3000cee9f5f3496a7e67cc59b2e08a681a89.tar.gz
oeqa qemurunner.py: try to avoid reading one character at a time
Read from serial console with a small delay to bundle data to e.g. full lines. Reading one character at a time is not needed and causes busy looping. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 0049f6757f6f956fb4cc77b3df6a672c20b53cf4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index d21b0a275f..1aaba02bd8 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -653,6 +653,8 @@ class QemuRunner:
except InterruptedError:
continue
if sread:
+ # try to avoid reading single character at a time
+ time.sleep(0.1)
answer = self.server_socket.recv(1024)
if answer:
data += answer.decode('utf-8')