Skip to content

Commit 5873f97

Browse files
remove thread::sleep(Duration::from_secs(3)) and child.kill()
1 parent 7482ce1 commit 5873f97

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

xtask/src/main.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ use std::{
33
fs,
44
path::PathBuf,
55
process::{Command, Stdio},
6-
thread,
7-
time::Duration,
86
};
97

108
fn find_golden_file(target: &str, example: &str) -> Option<PathBuf> {
@@ -101,16 +99,14 @@ fn main() -> anyhow::Result<()> {
10199
qemu_args.push("none");
102100
}
103101
let kernel_path = format!("target/{}/release/examples/{}", target, example);
104-
let mut child = Command::new(qemu)
102+
let child = Command::new(qemu)
105103
.args(&qemu_args)
106104
.arg("-kernel")
107105
.arg(&kernel_path)
108106
.stdout(Stdio::piped())
109107
.stderr(Stdio::piped())
110108
.spawn()
111109
.context("running qemu")?;
112-
thread::sleep(Duration::from_secs(3));
113-
let _ = child.kill();
114110
let output = child.wait_with_output()?;
115111
let raw_stdout = String::from_utf8_lossy(&output.stdout).into_owned();
116112
let stdout = raw_stdout

0 commit comments

Comments
 (0)