diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2023-09-09 01:42:49 +0200 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-09-18 17:36:16 +0000 |
commit | 4729358fa5d9a9d817fe4ccff27d8656c17b2075 (patch) | |
tree | 789b1196408671757a9fcde8791519c9b335bd3c /nixos/lib | |
parent | f66eb0df3b238af9e0f88918a52adfd11db7ac84 (diff) |
nixos/test-driver: do not break if the command writes to stderr
Capturing `stderr` as part of the return `output` could break existing tests.
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/test-driver/test_driver/machine.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/lib/test-driver/test_driver/machine.py b/nixos/lib/test-driver/test_driver/machine.py index 809fd690d7173..724b5a6a750da 100644 --- a/nixos/lib/test-driver/test_driver/machine.py +++ b/nixos/lib/test-driver/test_driver/machine.py @@ -582,9 +582,7 @@ class Machine: # 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" - ) + 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()) |