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-10 09:25:44 +0000 |
commit | 9437c739053f81e5f67dccb1696dd944e2984a10 (patch) | |
tree | 0692879407e7def129f713a43b966832df6d4c7e /meta/lib/oeqa/utils/qemurunner.py | |
parent | 18bcccc8f8dbf3541e7c7c4dec38b5fe9e2c7f20 (diff) | |
download | poky-9437c739053f81e5f67dccb1696dd944e2984a10.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: 0049f6757f6f956fb4cc77b3df6a672c20b53cf4)
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>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-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 bce00c696a..05385763ac 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -658,6 +658,8 @@ class QemuRunner: | |||
658 | except InterruptedError: | 658 | except InterruptedError: |
659 | continue | 659 | continue |
660 | if sread: | 660 | if sread: |
661 | # try to avoid reading single character at a time | ||
662 | time.sleep(0.1) | ||
661 | answer = self.server_socket.recv(1024) | 663 | answer = self.server_socket.recv(1024) |
662 | if answer: | 664 | if answer: |
663 | data += answer.decode('utf-8') | 665 | data += answer.decode('utf-8') |