ebaab7fa41
The tests that read the install assert the stock 1.12.1 data, so a player's texture pack (Project Reforged's patch-A, -G, -T...) or an interface mod (patch-F) in the same Data folder failed them. With $BENILLA_STOCK_CHAIN set, Chain::open mounts a Data directory's base set, patch.MPQ, patch-2.MPQ and speech2.MPQ, and leaves out every other patch-?.MPQ; the language pack's folder is not filtered. scripts/unit-tests.sh, the gates' test runner, exports it. Verified: a chain test (stock mode keeps patch and patch-2, drops patch-A.mpq and patch-F.MPQ; without it all mount); benilla-formats' 547 tests pass on the install with Reforged's A and G under BENILLA_STOCK_CHAIN=1, where three character tests failed before. The other crates' install tests were not run here. Built on Windows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
17 lines
898 B
Bash
Executable File
17 lines
898 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# The test gates' runner: the tests of every target the cargo package and target flags it is given
|
|
# select, all run, a failure not stopping the rest. Under cargo-nextest where it is installed, which
|
|
# runs every test binary's tests in one pool (the workspace takes 59 s to `cargo test`'s 103 s on a
|
|
# warm tree, M4 Max); else `cargo test`. nextest runs no doctests: `scripts/doc-tests.sh` does.
|
|
#
|
|
# scripts/unit-tests.sh --workspace
|
|
# scripts/unit-tests.sh -p benilla-app --no-default-features --lib
|
|
set -euo pipefail
|
|
# The tests that read the install assert the stock 1.12.1 data: the chain leaves out any other
|
|
# patch archive a player added (texture packs, interface mods) (`Chain::open`).
|
|
export BENILLA_STOCK_CHAIN=1
|
|
if cargo nextest --version >/dev/null 2>&1; then
|
|
exec cargo nextest run --no-fail-fast --no-tests=pass "$@"
|
|
fi
|
|
exec cargo test --no-fail-fast "$@"
|