Commit 9bb306bd authored by Ricardo Martincoski's avatar Ricardo Martincoski Committed by Thomas Petazzoni
Browse files

support/testing: large timeout for login prompt



When running multiple instances of emulator in parallel, the login
prompt can take some time to appear.

Use a large timeout when waiting for the prompt to avoid random
failures.

Signed-off-by: default avatarRicardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent f98b93da
...@@ -72,8 +72,10 @@ class Emulator(object): ...@@ -72,8 +72,10 @@ class Emulator(object):
# Wait for the login prompt to appear, and then login as root with # Wait for the login prompt to appear, and then login as root with
# the provided password, or no password if not specified. # the provided password, or no password if not specified.
def login(self, password=None): def login(self, password=None):
# The login prompt can take some time to appear when running multiple
# instances in parallel, so set the timeout to a large value
index = self.qemu.expect(["buildroot login:", pexpect.TIMEOUT], index = self.qemu.expect(["buildroot login:", pexpect.TIMEOUT],
timeout=10) timeout=60)
if index != 0: if index != 0:
self.logfile.write("==> System does not boot") self.logfile.write("==> System does not boot")
raise SystemError("System does not boot") raise SystemError("System does not boot")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment