(udid: &str, status: &mut Value)
| 416 | } |
| 417 | |
| 418 | fn enrich_status(udid: &str, status: &mut Value) { |
| 419 | let Some(object) = status.as_object_mut() else { |
| 420 | return; |
| 421 | }; |
| 422 | object.insert("udid".to_owned(), Value::String(udid.to_owned())); |
| 423 | if let Some(pid) = object |
| 424 | .get("processId") |
| 425 | .and_then(Value::as_u64) |
| 426 | .and_then(|value| u32::try_from(value).ok()) |
| 427 | { |
| 428 | object.insert("daemonPid".to_owned(), json!(pid)); |
| 429 | } |
| 430 | object.insert("bundleIds".to_owned(), json!(read_injected_bundles(udid))); |
| 431 | object.insert( |
| 432 | "appLogPath".to_owned(), |
| 433 | Value::String(camera_app_log_file(udid).display().to_string()), |
| 434 | ); |
| 435 | } |
| 436 | |
| 437 | fn record_injected_bundle(udid: &str, bundle_id: &str) -> Result<(), AppError> { |
| 438 | let mut bundle_ids = read_injected_bundles(udid); |
no test coverage detected