Skip to content

Commit 9e5f61f

Browse files
committed
Workaround for old android not having echo
1 parent 4309954 commit 9e5f61f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

library/std/src/process/tests.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,14 @@ fn run_canonical_bat_script() {
585585

586586
#[test]
587587
fn terminate_exited_process() {
588-
let mut p = known_command().arg("hello").spawn().unwrap();
588+
let mut cmd = if cfg!(target_os = "android") {
589+
let mut p = shell_cmd();
590+
p.args(&["-c", "true"]);
591+
p
592+
} else {
593+
known_command()
594+
};
595+
let mut p = cmd.stdout(Stdio::null()).spawn().unwrap();
589596
p.wait().unwrap();
590597
assert!(p.kill().is_ok());
591598
assert!(p.kill().is_ok());

0 commit comments

Comments
 (0)