Skip to content

Commit

Permalink
Hacky solution was still needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlamonster committed Dec 8, 2023
1 parent 969b696 commit 7c62d5d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions compiler/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@ fn integration([test]: [&str; 1]) {
.into_diagnostic()
.unwrap();

let mut child = Command::new("./output")
.current_dir(&tempdir)
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
.unwrap();
let create_child = || {
Command::new("./output")
.current_dir(&tempdir)
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
};

// Wait for output to be executable.
let mut child = loop {
match create_child() {
Ok(child) => break child,
_ => {}
}
};

let mut stdin = child.stdin.take().unwrap();

Expand Down

0 comments on commit 7c62d5d

Please sign in to comment.