mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-19 11:43:39 -04:00
Workaround for old android not having echo
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user