nixos/test-driver: fix timeout
option for wait_for_console_text
This commit is contained in:
parent
4729ffac6f
commit
f1f0d4fbdd
1 changed files with 2 additions and 2 deletions
|
@ -868,7 +868,7 @@ class Machine:
|
||||||
# to match multiline regexes.
|
# to match multiline regexes.
|
||||||
console = io.StringIO()
|
console = io.StringIO()
|
||||||
|
|
||||||
def console_matches() -> bool:
|
def console_matches(_: Any) -> bool:
|
||||||
nonlocal console
|
nonlocal console
|
||||||
try:
|
try:
|
||||||
# This will return as soon as possible and
|
# This will return as soon as possible and
|
||||||
|
@ -884,7 +884,7 @@ class Machine:
|
||||||
if timeout is not None:
|
if timeout is not None:
|
||||||
retry(console_matches, timeout)
|
retry(console_matches, timeout)
|
||||||
else:
|
else:
|
||||||
while not console_matches():
|
while not console_matches(False):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def send_key(
|
def send_key(
|
||||||
|
|
Loading…
Reference in a new issue