diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2023-07-05 09:54:16 +0100 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2023-07-05 09:54:16 +0100 |
| commit | 9e5f61fcdd29936938d401c0f0055b9af32caf5c (patch) | |
| tree | 268ae05dad3df01e6650325f62870e790f89f1f8 | |
| parent | 4309954187657bddc8daba59187a463d612cf3f9 (diff) | |
| download | rust-9e5f61fcdd29936938d401c0f0055b9af32caf5c.tar.gz rust-9e5f61fcdd29936938d401c0f0055b9af32caf5c.zip | |
Workaround for old android not having echo
| -rw-r--r-- | library/std/src/process/tests.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/library/std/src/process/tests.rs b/library/std/src/process/tests.rs index e2c56e634d9..366b591466c 100644 --- a/library/std/src/process/tests.rs +++ b/library/std/src/process/tests.rs @@ -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()); |
