]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa qemurunner.py: try to avoid reading one character at a time
authorMikko Rapeli <mikko.rapeli@linaro.org>
Thu, 9 Feb 2023 08:09:36 +0000 (10:09 +0200)
committerSteve Sakoman <steve@sakoman.com>
Sat, 18 Feb 2023 16:41:49 +0000 (06:41 -1000)
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>
meta/lib/oeqa/utils/qemurunner.py

index d21b0a275f2c78dfdfafb3e6063b3634c655de88..1aaba02bd82f4816c7c4d6a3515b5c63d1670c91 100644 (file)
@@ -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')