Skip to content

Commit fba6b5d

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

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: tests/runner/src/main.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{
22
path::{Path, PathBuf},
3-
process::Command,
3+
process::{Command, Stdio}, io::Write,
44
};
55

66
const QEMU_ARGS: &[&str] = &[
@@ -28,8 +28,11 @@ fn main() {
2828
run_cmd.args(QEMU_ARGS);
2929
run_cmd.args(std::env::args().skip(2).collect::<Vec<_>>());
3030

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

0 commit comments

Comments
 (0)