Skip to content

Commit 4529b53

Browse files
committed
Test runner: Print all qemu output to stderr
1 parent dd1035b commit 4529b53

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/runner/src/main.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::{
2+
io::Write,
23
path::{Path, PathBuf},
3-
process::Command,
4+
process::{Command, Stdio},
45
};
56

67
const QEMU_ARGS: &[&str] = &[
@@ -28,8 +29,11 @@ fn main() {
2829
run_cmd.args(QEMU_ARGS);
2930
run_cmd.args(std::env::args().skip(2).collect::<Vec<_>>());
3031

31-
let exit_status = run_cmd.status().unwrap();
32-
match exit_status.code() {
32+
let child_output = run_cmd.output().unwrap();
33+
std::io::stderr().write_all(&child_output.stderr).unwrap();
34+
std::io::stderr().write_all(&child_output.stdout).unwrap();
35+
36+
match child_output.status.code() {
3337
Some(33) => {} // success
3438
Some(35) => panic!("Test failed"), // success
3539
other => panic!("Test failed with unexpected exit code `{:?}`", other),

0 commit comments

Comments
 (0)