Commit d81d119
committed
lib/test-driver: fix reading command output for other distros
When running the test-driver on other distros (e.g., via
[https://github.com/numtide/nix-vm-test/](nix-vm-test)) executing a command
can fail if the driver receives both stdout and stderr.
The test-driver’s logic for reading output currently assumes it will only read
base64 encoded stdout, so any extra stderr content leads to unexpected
failures.
This commit fixes the issue by redirecting the stderr to /dev/null, ensuring
the driver only sees stdout.
The tradeoff is losing stderr messages in the machine logs. Users can work
around this by redirecting stderr to stdout in the command they are sending
to the machine:
```python
machine.execute("some_command 2>&1")
```
Related issues:
- numtide/nix-vm-test#84
- numtide/nix-vm-test#51 parent 866edf5 commit d81d119
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | | - | |
579 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
580 | 583 | | |
581 | 584 | | |
582 | 585 | | |
| |||
0 commit comments