use std::process::Command;
#[test]
#[ignore = "requires a booted Android emulator + NDK; opt in with KOH_ANDROID_EMULATOR=1"]
fn android_stress_suite() {
if std::env::var_os("KOH_ANDROID_EMULATOR").as_deref() != Some(std::ffi::OsStr::new("1")) {
eprintln!("skipping: set KOH_ANDROID_EMULATOR=1 to run the Android stress suite");
return;
}
let script = concat!(
env!("CARGO_MANIFEST_DIR"),
"/testing/android/scripts/run-stress.sh"
);
let status = Command::new("sh")
.arg(script)
.status()
.expect("failed to launch testing/android/scripts/run-stress.sh");
assert!(
status.success(),
"Android stress suite failed (see output above); run-stress.sh exited with {status}"
);
}