Skip to content

Commit

Permalink
Workaround for old android not having echo
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Jul 5, 2023
1 parent 4309954 commit 9e5f61f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion library/std/src/process/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,14 @@ fn run_canonical_bat_script() {

#[test]
fn terminate_exited_process() {
let mut p = known_command().arg("hello").spawn().unwrap();
let mut cmd = if cfg!(target_os = "android") {
let mut p = shell_cmd();
p.args(&["-c", "true"]);
p
} else {
known_command()
};
let mut p = cmd.stdout(Stdio::null()).spawn().unwrap();
p.wait().unwrap();
assert!(p.kill().is_ok());
assert!(p.kill().is_ok());
Expand Down

0 comments on commit 9e5f61f

Please sign in to comment.