Merge pull request #127763 from Mic92/test-driver-shell
nixos/test-driver: replace termlib with socat
This commit is contained in:
commit
243f958b40
2 changed files with 5 additions and 4 deletions
|
@ -462,9 +462,10 @@ 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):")
|
||||
telnet = telnetlib.Telnet()
|
||||
telnet.sock = self.shell # type: ignore
|
||||
telnet.interact()
|
||||
subprocess.run(
|
||||
["socat", "READLINE", f"FD:{self.shell.fileno()}"],
|
||||
pass_fds=[self.shell.fileno()],
|
||||
)
|
||||
|
||||
def succeed(self, *commands: str) -> str:
|
||||
"""Execute each command and check that it succeeds."""
|
||||
|
|
|
@ -64,7 +64,7 @@ rec {
|
|||
|
||||
wrapProgram $out/bin/nixos-test-driver \
|
||||
--argv0 ${name} \
|
||||
--prefix PATH : "${lib.makeBinPath [ qemu_pkg vde2 netpbm coreutils ]}" \
|
||||
--prefix PATH : "${lib.makeBinPath [ qemu_pkg vde2 netpbm coreutils socat ]}" \
|
||||
${lib.optionalString enableOCR
|
||||
"--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \
|
||||
|
||||
|
|
Loading…
Reference in a new issue