Print skips for unavailable sandbox fixtures and use multicall undo guests

This commit is contained in:
2026-11-12 12:13:39 +00:00
parent dd79b573f1
commit 2edc47958b
4 changed files with 54 additions and 4 deletions
+6
View File
@@ -51,6 +51,12 @@ async fn run(runtime: &Arc<Runtime>, 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();
+4
View File
@@ -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())?;
+41
View File
@@ -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<Runtime>) {
}
#[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;
+3 -4
View File
@@ -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(