Print sandbox test skips and update the multicall shutdown helper

Keep the full test suite selected without new fixture derivations.

Assisted-by: SurmAgent:unknown [read] [edit] [bash]
This commit is contained in:
2026-11-12 11:22:09 +00:00
parent 93968ac6db
commit dd79b573f1
6 changed files with 28 additions and 2 deletions
+1
View File
@@ -61,6 +61,7 @@ Coreutils, diffutils, procps, and brush use relative symlinks to one binary each
`nix flake check` checks the packaged host, its bundle, and the whole host/VFS test suite.
Sandbox-incompatible tests print an explicit skip reason instead of a flake-level filter.
The check sets `SAUSAGE_NIX_CHECK=1` for tests that need network access or unvendored fixture dependencies.
## Tests
+1
View File
@@ -167,6 +167,7 @@
doCheck = true;
nativeBuildInputs = hostArgs.nativeBuildInputs ++ builderTools ++ [ pkgs.git pkgs.nodejs ];
SAUSAGE_TEST_NO_BUILDER_SANDBOX = "1";
SAUSAGE_NIX_CHECK = "1";
SAUSAGE_USERLAND = bundle;
preCheck = ''
export SAUSAGE_CACHE="$TMPDIR/sausage-cache"
+6
View File
@@ -170,6 +170,12 @@ fn cache_hits(base: &Path) -> anyhow::Result<u64> {
}
#[tokio::test(flavor = "multi_thread")]
async fn cargo_build_test_and_source_changes() -> anyhow::Result<()> {
if std::env::var("SAUSAGE_NIX_CHECK").as_deref() == Ok("1") {
println!(
"SKIP builder::cargo_build_test_and_source_changes: the isolated builder fixture requires crates.io access"
);
return Ok(());
}
let binaries = programs();
let temp = tempfile::tempdir()?;
let world = World::open(temp.path())?;
+2 -2
View File
@@ -60,7 +60,7 @@ fn sigterm_cancels_tool_and_resumes() -> anyhow::Result<()> {
"-p",
"sausage-coreutils",
"--bin",
"sleep",
"coreutils",
"--manifest-path",
])
.arg(source.join("Cargo.toml"))
@@ -74,7 +74,7 @@ fn sigterm_cancels_tool_and_resumes() -> anyhow::Result<()> {
World::open(dir.path())?;
std::fs::create_dir_all(dir.path().join("world/bin"))?;
std::fs::copy(
target.join("wasm32-wasip2/release/sleep.wasm"),
target.join("wasm32-wasip2/release/coreutils.wasm"),
dir.path().join("world/bin/sleep.wasm"),
)?;
let spawn = || {
+12
View File
@@ -52,6 +52,12 @@ async fn run(runtime: &Arc<Runtime>, url: String, chain: Vec<String>) -> String
}
#[tokio::test]
async fn identity_injection_denial_and_ambiguity() {
if std::env::var("SAUSAGE_NIX_CHECK").as_deref() == Ok("1") {
println!(
"SKIP hook::identity_injection_denial_and_ambiguity: 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();
@@ -325,6 +331,12 @@ async fn upstream(
#[tokio::test]
async fn streamed_upload_redirect_and_http_admin_denial() {
if std::env::var("SAUSAGE_NIX_CHECK").as_deref() == Ok("1") {
println!(
"SKIP hook::streamed_upload_redirect_and_http_admin_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();
+6
View File
@@ -16,6 +16,12 @@ use super::hook_guest;
#[tokio::test]
async fn one_api_for_pages_and_guest_requests() -> anyhow::Result<()> {
if std::env::var("SAUSAGE_NIX_CHECK").as_deref() == Ok("1") {
println!(
"SKIP hook_api::one_api_for_pages_and_guest_requests: the wstd fixture dependency is not vendored"
);
return Ok(());
}
use webauthn_authenticator_rs::{WebauthnAuthenticator, softpasskey::SoftPasskey};
let dir = tempfile::tempdir()?;
let world = World::open(dir.path())?;