tests/battle/Dockerfile.install-test — ubuntu:24.04 + deps (git, curl, ca-certificates, build-essential, jq, pandoc, rustup) tests/battle/battle-entry.sh — ENTRYPOINT: runs install.sh with $PROFILE (default minimal), then verify.sh tests/battle/verify.sh — POSIX sh gate: blocks >= 79, skills >= 39, top hooks >= 10, _lib hooks >= 2, test-gate.sh exits 0, settings.json valid JSON tests/battle/README.md — build + run docs SHIP-BLOCKER FOUND (for follow-up fix commit): kei-artifact crate fails to compile on fresh install because install/lib-primitives.sh::copy_rust_primitive copies only Cargo.toml + src/ + tests/. Crate has sibling schemas/ dir with 5 JSON files that src/schemas.rs include_str!s at compile time. Missing → cargo build error, install exits 0 (soft-fail design) but full profile only produces 6/25 binaries instead of 25/25. Real stdout verified: minimal: 80 blocks, 39 skills, 10 hooks, 3 _lib — exit 0 ✓ dev: same counts — exit 0 ✓ BUT 3/8 binaries (kei-artifact fail) full: same counts — exit 0 ✓ BUT 6/25 binaries Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
863 B
Bash
Executable file
28 lines
863 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# tests/battle/battle-entry.sh — container ENTRYPOINT.
|
|
# Picks profile from $PROFILE env (default: minimal), runs installer, then
|
|
# verify.sh. Kept as a dedicated file (instead of a Dockerfile heredoc) so
|
|
# BuildKit isn't required and the script is editable post-image-build.
|
|
set -u
|
|
|
|
PROFILE="${PROFILE:-minimal}"
|
|
echo "=== battle-test: profile=$PROFILE ==="
|
|
echo "=== host: $(uname -a) ==="
|
|
echo "=== cargo: $(cargo --version) ==="
|
|
echo "=== jq: $(jq --version) ==="
|
|
echo
|
|
|
|
cd /opt/keiseikit || { echo "kit missing at /opt/keiseikit"; exit 2; }
|
|
./install.sh --profile="$PROFILE" --yes 2>&1
|
|
INSTALL_EXIT=$?
|
|
echo
|
|
echo "=== install exit code: $INSTALL_EXIT ==="
|
|
|
|
if [ "$INSTALL_EXIT" -ne 0 ]; then
|
|
echo "=== install failed; skipping verify ==="
|
|
exit "$INSTALL_EXIT"
|
|
fi
|
|
|
|
echo
|
|
echo "=== running verify.sh ==="
|
|
/usr/local/bin/verify.sh
|