support/testing: large timeout for login prompt
authorRicardo Martincoski <ricardo.martincoski@gmail.com>
Thu, 29 Jun 2017 02:45:49 +0000 (23:45 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 1 Jul 2017 14:05:14 +0000 (16:05 +0200)
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: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/testing/infra/emulator.py

index 0f925fc9fbe7336c1dedd0873a4eaa082ff36ba4..a39d59b88129e586b218b1632c17281e5caad60d 100644 (file)
@@ -72,8 +72,10 @@ class Emulator(object):
     # Wait for the login prompt to appear, and then login as root with
     # the provided password, or no password if not specified.
     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],
-                                 timeout=10)
+                                 timeout=60)
         if index != 0:
             self.logfile.write("==> System does not boot")
             raise SystemError("System does not boot")