summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index abbafd51e4..e1c8ea1085 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -366,23 +366,25 @@ class QemuRunner:
366 # We assume target system have echo to get command status 366 # We assume target system have echo to get command status
367 if not raw: 367 if not raw:
368 command = "%s; echo $?\n" % command 368 command = "%s; echo $?\n" % command
369 self.server_socket.sendall(command) 369
370 data = '' 370 data = ''
371 status = 0 371 status = 0
372 stopread = False 372 self.server_socket.sendall(command)
373 endtime = time.time()+5 373 keepreading = True
374 while time.time()<endtime and not stopread: 374 while keepreading:
375 sread, _, _ = select.select([self.server_socket],[],[],5) 375 sread, _, _ = select.select([self.server_socket],[],[],5)
376 for sock in sread: 376 if sread:
377 answer = sock.recv(1024) 377 answer = self.server_socket.recv(1024)
378 if answer: 378 if answer:
379 data += answer 379 data += answer
380 # Search the prompt to stop 380 # Search the prompt to stop
381 if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data): 381 if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
382 stopread = True 382 keepreading = False
383 break
384 else: 383 else:
385 raise Exception("No data on serial console socket") 384 raise Exception("No data on serial console socket")
385 else:
386 keepreading = False
387
386 if data: 388 if data:
387 if raw: 389 if raw:
388 status = 1 390 status = 1