()
| 30 | } |
| 31 | |
| 32 | fn stop_service() -> anyhow::Result<()> { |
| 33 | match Command::new("killall") |
| 34 | .args(["-TERM", "com.apple.CoreSimulator.CoreSimulatorService"]) |
| 35 | .output() |
| 36 | .context("run killall")? |
| 37 | { |
| 38 | output if output.status.success() => Ok(()), |
| 39 | output => { |
| 40 | let stderr = String::from_utf8_lossy(&output.stderr); |
| 41 | if stderr.contains("No matching processes") { |
| 42 | Ok(()) |
| 43 | } else { |
| 44 | bail_with_output("killall CoreSimulatorService", output).map(|_| ()) |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | fn run_xcrun<const N: usize>(args: [&str; N]) -> anyhow::Result<Output> { |
| 51 | let output = Command::new("xcrun") |
no test coverage detected