Files
sausage/host/tests

Host integration tests

All host integration tests share the it executable. Each module keeps its former file name.

cargo test -p sausage --test it
cargo test -p sausage --test it -- chain::
cargo test -p sausage --test it -- --test-threads=1

Use nix develop -c and the required build slot wrapper for these commands. Set CARGO_TARGET_DIR to your executor's target directory.

The journal timing benchmark keeps its 10% threshold but does not run in the default suite. Run it by hand on an idle machine:

cargo test --release -p sausage --test it -- --ignored undo_cost

Add new modules under host/tests/it/ and declare them in it/main.rs. Cargo does not discover separate test executables in host/tests/. Fixture sources remain in builder-fixture/. The bundle-copy regression preserves relative symlink targets, including broken links.

common.rs shares the target lookup and the cached userland Git build. A shared mutex protects the cwd-init output and the brush checkout during fixture builds. The cwd-init build runs at most once per process when its output is absent. The first parallel run reproduced a collision when two compiler processes wrote init.o. Tests use temporary worlds and ephemeral listener ports. Child processes receive environment variables through Command, not through changes to the test process. SIGKILL parents use fully qualified test filters with --exact.

The hook::hook_git and hook_git registrations both existed before this move. Both remain as wrappers around one shared helper to preserve the test count. The shared hook_guest module now builds its fixture once per process.