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:46 +0000 |
commit | da91128b6d5258644a325745407fd6853442c3e7 (patch) | |
tree | 2e69956b772a1ec1400c5845d21bd1184b2bd36d /meta/lib/oeqa/utils | |
parent | 90fd95edad5a08056490b99b8bb9b776cd46279a (diff) | |
download | poky-da91128b6d5258644a325745407fd6853442c3e7.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: e91a09702680b713293bcfcc851b27a73e884a8b)
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/oeqa/utils')
-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 aa9e530f1b..925d05a339 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -647,6 +647,8 @@ class QemuRunner: | |||
647 | except InterruptedError: | 647 | except InterruptedError: |
648 | continue | 648 | continue |
649 | if sread: | 649 | if sread: |
650 | # try to avoid reading single character at a time | ||
651 | time.sleep(0.1) | ||
650 | answer = self.server_socket.recv(1024) | 652 | answer = self.server_socket.recv(1024) |
651 | if answer: | 653 | if answer: |
652 | data += answer.decode('utf-8') | 654 | data += answer.decode('utf-8') |