Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nixos/lib/test-driver/src/test_driver/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,12 @@ def execute(

# While sh is bash on NixOS, this is not the case for every distro.
# We explicitly call bash here to allow for the driver to boot other distros as well.
out_command = (
f"{timeout_str} bash -c {shlex.quote(command)} | (base64 -w 0; echo)\n"
)
#
# Other distros could send both stdout and stderr to the test-driver. Receiving both
# breaks the code for getting the output since the code assumes it will only receive
# base64 encoded stdout.
# Redirect stderr to /dev/null to avoid these compatibility issues.
out_command = f"{timeout_str} bash -c {shlex.quote(command)} 2> /dev/null | (base64 -w 0; echo)\n"

assert self.shell
self.shell.send(out_command.encode())
Expand Down