Merge pull request #154804 from Mic92/tests-prompt

nixos/tests: add prompt to shell_interact()
This commit is contained in:
Lassulus 2022-02-02 18:50:46 +01:00 committed by GitHub
commit b80607af67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -543,11 +543,11 @@ class Machine:
Should only be used during test development, not in the production test."""
self.connect()
self.log("Terminal is ready (there is no prompt):")
self.log("Terminal is ready (there is no initial prompt):")
assert self.shell
subprocess.run(
["socat", "READLINE", f"FD:{self.shell.fileno()}"],
["socat", "READLINE,prompt=$ ", f"FD:{self.shell.fileno()}"],
pass_fds=[self.shell.fileno()],
)