(args: &[&str])
| 319 | } |
| 320 | |
| 321 | async fn sandbox_create_output(args: &[&str]) -> String { |
| 322 | let mut cmd = openshell_cmd(); |
| 323 | cmd.arg("sandbox").arg("create").args(args); |
| 324 | cmd.stdout(Stdio::piped()).stderr(Stdio::piped()); |
| 325 | |
| 326 | let output = timeout(SANDBOX_CREATE_TIMEOUT, cmd.output()) |
| 327 | .await |
| 328 | .expect("sandbox create should complete before timeout") |
| 329 | .expect("openshell command should spawn"); |
| 330 | |
| 331 | assert!( |
| 332 | !output.status.success(), |
| 333 | "sandbox create unexpectedly succeeded with invalid GPU device" |
| 334 | ); |
| 335 | |
| 336 | let stdout = String::from_utf8_lossy(&output.stdout); |
| 337 | let stderr = String::from_utf8_lossy(&output.stderr); |
| 338 | strip_ansi(&format!("{stdout}{stderr}")) |
| 339 | } |
| 340 | |
| 341 | #[tokio::test] |
| 342 | #[serial(gpu)] |
no test coverage detected