diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -34,6 +34,33 @@ test: ## fast suite (~5s): properties sample 200 years check: ## full gate (~2min): every year 1583-9999, not a sample COLITUR_EXHAUSTIVE_SWEEP=1 $(DUNE) dune test --force + $(MAKE) check-install + +# C1 fix-wave regression guard (final-review.md, 2026-08-25-colitur-of-phases-3-5): +# a `dune install`ed colitur exited 2 on `--rite of` because data/dune never +# named the OF runtime files -- and nothing in the suite caught it, because +# test/cli.t's cram sandbox binds %{bin:colitur} inside the BUILD TREE, where +# [data_dir]/[of_data_dir]'s build-tree fallback candidate resolves even when +# the installed one is missing entirely. This target is the guard: it installs +# to a scratch prefix -- the exact `dune install --prefix X` the review used to +# reproduce C1, not a hand-rolled copy -- and runs BOTH rites against the +# installed binary only, asserting exit 0 and the expected day count. Wired +# into `check` (not opt-in like check-schema/check-templates/check-citations +# above, which skip when an external tool is missing) because installing needs +# nothing beyond what building already needs. +check-install: build ## regression guard: run an INSTALLED colitur (both rites), not just the build tree + @set -e; \ + scratch=$$(mktemp -d); \ + trap 'rm -rf "$$scratch"' EXIT; \ + $(DUNE) dune install --prefix "$$scratch" >/dev/null; \ + test -f "$$scratch/share/colitur/of/calendar-2002.sexp" || \ + { echo "check-install: share/colitur/of/calendar-2002.sexp was not installed" >&2; exit 1; }; \ + ef_lines=$$("$$scratch/bin/colitur" day 2026 | wc -l); \ + of_lines=$$("$$scratch/bin/colitur" day --rite of 2026 | wc -l); \ + test "$$ef_lines" -eq 365 || { echo "check-install: installed 'day 2026' (EF) printed $$ef_lines lines, want 365" >&2; exit 1; }; \ + test "$$of_lines" -eq 365 || { echo "check-install: installed 'day --rite of 2026' printed $$of_lines lines, want 365" >&2; exit 1; }; \ + "$$scratch/bin/colitur" readings --rite of 2026 >/dev/null; \ + echo "check-install: installed EF ($$ef_lines lines) and OF ($$of_lines lines) both run cleanly from a scratch prefix" check-schema: build ## validate emitted XML against schema/colitur-v1.xsd (needs xmllint; skipped if absent) @if command -v xmllint >/dev/null 2>&1; then \ |
