From: Mikko Rapeli Date: Thu, 9 Feb 2023 08:09:36 +0000 (+0200) Subject: oeqa qemurunner.py: try to avoid reading one character at a time X-Git-Tag: 2022-10.3-langdale~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab1e3000cee9f5f3496a7e67cc59b2e08a681a89;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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 Signed-off-by: Luca Ceresoli (cherry picked from commit 0049f6757f6f956fb4cc77b3df6a672c20b53cf4) Signed-off-by: Steve Sakoman --- diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index d21b0a275f2..1aaba02bd82 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')