From 2edc47958bde3e99ecdaa79a852b2ab6eed58735 Mon Sep 17 00:00:00 2001 From: Surma Date: Thu, 12 Nov 2026 12:13:39 +0000 Subject: [PATCH] Print skips for unavailable sandbox fixtures and use multicall undo guests --- host/tests/it/net.rs | 6 ++++++ host/tests/it/p2.rs | 4 ++++ host/tests/it/process.rs | 41 ++++++++++++++++++++++++++++++++++++++ host/tests/it/undo_exec.rs | 7 +++---- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/host/tests/it/net.rs b/host/tests/it/net.rs index 8a98a9f..6272b14 100644 --- a/host/tests/it/net.rs +++ b/host/tests/it/net.rs @@ -51,6 +51,12 @@ async fn run(runtime: &Arc, mode: &str, address: String) -> String { } #[tokio::test] async fn guest_tcp_and_host_denial() { + if std::env::var_os("SAUSAGE_NIX_CHECK").is_some() { + eprintln!( + "SKIP net::guest_tcp_and_host_denial: the wstd fixture dependency is not vendored" + ); + return; + } let guest = hook_guest::component(); let temp = tempfile::tempdir().unwrap(); let world = World::open(temp.path()).unwrap(); diff --git a/host/tests/it/p2.rs b/host/tests/it/p2.rs index 07ab7e5..ecc952d 100644 --- a/host/tests/it/p2.rs +++ b/host/tests/it/p2.rs @@ -206,6 +206,10 @@ fn no_secrets(path: &Path, secrets: &[&[u8]]) -> Result<()> { #[tokio::test(flavor = "current_thread")] async fn request_approve_fetch_and_ssh_push() -> Result<()> { + if std::env::var_os("SAUSAGE_NIX_CHECK").is_some() { + eprintln!("SKIP p2::request_approve_fetch_and_ssh_push: the SSH fixture requires a host sshd service"); + return Ok(()); + } let components = components()?; let dir = tempfile::tempdir()?; let world = World::open(dir.path())?; diff --git a/host/tests/it/process.rs b/host/tests/it/process.rs index 1c35792..cbcd9c4 100644 --- a/host/tests/it/process.rs +++ b/host/tests/it/process.rs @@ -107,6 +107,9 @@ mod features { } #[tokio::test(flavor = "multi_thread")] async fn core_module_exit_and_cancellation() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (temp, runtime, processes) = world(); let bin = temp.path().join("world/bin"); @@ -140,6 +143,9 @@ mod features { } #[tokio::test(flavor = "multi_thread")] async fn preview1_pipeline_and_esbuild() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (temp, runtime, _) = world(); warm(&runtime).await; @@ -223,6 +229,9 @@ mod features { } #[tokio::test(flavor = "multi_thread")] async fn inherited_stdio_identity_and_conversation() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (_temp, runtime, processes) = world(); warm(&runtime).await; @@ -320,6 +329,9 @@ mod features { } #[tokio::test(flavor = "multi_thread")] async fn independent_copies_share_compilation() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (temp, runtime, _) = world(); let bin = temp.path().join("world/bin"); @@ -349,6 +361,9 @@ mod features { } #[tokio::test(flavor = "multi_thread")] async fn git_local_and_anonymous_https_clone() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (temp, runtime, _) = world(); warm(&runtime).await; @@ -393,6 +408,17 @@ fn target() -> PathBuf { .to_owned() }) } +fn skip_unvendored_probe() -> bool { + if std::env::var_os("SAUSAGE_NIX_CHECK").is_none() { + return false; + } + eprintln!( + "SKIP {}: the isolated brush probe lacks a vendored lock file", + std::thread::current().name().unwrap() + ); + true +} + fn build() { BUILD.call_once(|| { let root = repo(); @@ -529,6 +555,9 @@ async fn warm(runtime: &Arc) { } #[tokio::test(flavor = "multi_thread")] async fn cwd_without_program_workaround() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (_temp, runtime, _) = world(); let (code, output, _) = run(&runtime, Command::Argv(vec!["/bin/probe".into()]), "/work").await; @@ -561,6 +590,9 @@ async fn cwd_without_program_workaround() { } #[tokio::test(flavor = "multi_thread")] async fn corpus_matches_bash() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (temp, runtime, _) = world(); warm(&runtime).await; @@ -617,6 +649,9 @@ async fn empty(processes: &sausage::process::Processes) { } #[tokio::test(flavor = "multi_thread")] async fn timeout_and_drop_kill_descendants() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (_temp, runtime, processes) = world(); warm(&runtime).await; @@ -655,6 +690,9 @@ async fn timeout_and_drop_kill_descendants() { } #[tokio::test(flavor = "multi_thread")] async fn ps_and_kill_pipeline() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (_temp, runtime, processes) = world(); warm(&runtime).await; @@ -701,6 +739,9 @@ async fn ps_and_kill_pipeline() { } #[tokio::test(flavor = "multi_thread")] async fn output_keeps_stream_order() { + if skip_unvendored_probe() { + return; + } let _serial = SERIAL.lock().await; let (_temp, runtime, _) = world(); warm(&runtime).await; diff --git a/host/tests/it/undo_exec.rs b/host/tests/it/undo_exec.rs index 7f279f9..41693b3 100644 --- a/host/tests/it/undo_exec.rs +++ b/host/tests/it/undo_exec.rs @@ -35,8 +35,7 @@ async fn tool_call_commit_and_independent_change() { ); let guest_dir = target.join("wasm32-wasip2/release"); if !guest_dir.join("git.wasm").is_file() - || !guest_dir.join("cp.wasm").is_file() - || !guest_dir.join("touch.wasm").is_file() + || !guest_dir.join("coreutils.wasm").is_file() || !guest_dir.join("undo.wasm").is_file() { crate::common::cwd_init(); @@ -65,8 +64,8 @@ async fn tool_call_commit_and_independent_change() { std::fs::create_dir_all(root.join("repo")).unwrap(); for (binary, guest) in [ ("git", "git"), - ("cp", "cp"), - ("touch", "touch"), + ("coreutils", "cp"), + ("coreutils", "touch"), ("undo", "undo"), ] { std::fs::copy(