diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2023-02-09 10:09:36 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-24 16:41:51 +0000 |
commit | 53fc7b320cc4429d771e18c2b43be8d5e56360ec (patch) | |
tree | 518bc5563412df077e0f9dac686dbcb71347f28c /meta/lib | |
parent | f5c3677f705e375d4ceed2dc3574be0642fb7e02 (diff) | |
download | poky-53fc7b320cc4429d771e18c2b43be8d5e56360ec.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.
(From OE-Core rev: ab1e3000cee9f5f3496a7e67cc59b2e08a681a89)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 2 |
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: | |||
653 | except InterruptedError: | 653 | except InterruptedError: |
654 | continue | 654 | continue |
655 | if sread: | 655 | if sread: |
656 | # try to avoid reading single character at a time | ||
657 | time.sleep(0.1) | ||
656 | answer = self.server_socket.recv(1024) | 658 | answer = self.server_socket.recv(1024) |
657 | if answer: | 659 | if answer: |
658 | data += answer.decode('utf-8') | 660 | data += answer.decode('utf-8') |