]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Feb 2023 09:25:41 +0000 (09:25 +0000)
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>
meta/lib/oeqa/utils/qemurunner.py

index bce00c696a498495249973ac38c08c78c8bb71a7..05385763acecdb54a872e06a46d3c4f978bbb58e 100644 (file)
@@ -658,6 +658,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')