use std::process::Command;
#[test]
#[ignore = "requires a booted Android emulator + NDK; opt in with KOH_ANDROID_EMULATOR=1"]
fn android_emulator_smoke() {
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 emulator smoke test");
return;
}
let script = concat!(
env!("CARGO_MANIFEST_DIR"),
"/testing/android/scripts/run.sh"
);
let status = Command::new("sh")
.arg(script)
.status()
.expect("failed to launch testing/android/scripts/run.sh");
assert!(
status.success(),
"Android emulator tests failed (see output above); run.sh exited with {status}"
);
}