Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] support/testing/infra/emulator.py: add a timeout argument for the login method
@ 2023-11-05 21:52 Adam Duskett
  2023-11-05 21:52 ` [Buildroot] [PATCH 2/5] test_systemd_selinux.py: use timeout argument for emulator.login Adam Duskett
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Adam Duskett @ 2023-11-05 21:52 UTC (permalink / raw)
  To: buildroot; +Cc: Adam Duskett

to override the current value of 60 seconds

As per a suggestion by Thomas, add a timeout argument to override the current
value of 60 seconds for the emulator.login method.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
 support/testing/infra/emulator.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py
index 02cf486128..09f81eca89 100644
--- a/support/testing/infra/emulator.py
+++ b/support/testing/infra/emulator.py
@@ -84,11 +84,11 @@ 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):
+    def login(self, password=None, timeout=60):
         # 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=60 * self.timeout_multiplier)
+                                 timeout=timeout * self.timeout_multiplier)
         if index != 0:
             self.logfile.write("==> System does not boot")
             raise SystemError("System does not boot")
-- 
2.41.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-10 11:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 21:52 [Buildroot] [PATCH 1/5] support/testing/infra/emulator.py: add a timeout argument for the login method Adam Duskett
2023-11-05 21:52 ` [Buildroot] [PATCH 2/5] test_systemd_selinux.py: use timeout argument for emulator.login Adam Duskett
2023-11-06 19:45   ` Thomas Petazzoni via buildroot
2023-11-10 11:51   ` Peter Korsgaard
2023-11-05 21:52 ` [Buildroot] [PATCH 3/5] test_lxc.py: " Adam Duskett
2023-11-10 11:51   ` Peter Korsgaard
2023-11-05 21:52 ` [Buildroot] [PATCH 4/5] test_python_django.py: fix timeout calculation Adam Duskett
2023-11-10 11:51   ` Peter Korsgaard
2023-11-05 21:52 ` [Buildroot] [PATCH 5/5] support/testing/tests/package/test_firewalld.py: new test Adam Duskett
2023-11-06 19:44 ` [Buildroot] [PATCH 1/5] support/testing/infra/emulator.py: add a timeout argument for the login method Thomas Petazzoni via buildroot
2023-11-10 11:51 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox