diff options
| -rw-r--r-- | Makefile | 27 | ||||
| -rw-r--r-- | data/dune | 21 |
2 files changed, 47 insertions, 1 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 \ @@ -33,4 +33,23 @@ ; The Benedictine one is deliberately two entries long, and the comment ; block explaining why is the point of shipping it. (ef/examples/poland.ini as examples/poland.ini) - (ef/examples/benedictine.ini as examples/benedictine.ini))) + (ef/examples/benedictine.ini as examples/benedictine.ini) + ; The OF runtime data files, installed into <prefix>/share/colitur/of/ -- + ; same reasoning as the ef/ set above. Deliberately NOT + ; of/expected-divergences-litcal.sexp: that is a test fixture, read only by + ; test_oracle_of.ml, same as the EF allow-lists above. + (of/calendar-2002.sexp as of/calendar-2002.sexp) + (of/lectionary.sexp as of/lectionary.sexp) + (of/amendments/001-padre-pio.sexp as of/amendments/001-padre-pio.sexp) + (of/amendments/002-juan-diego-cuauhtlatoatzin.sexp as of/amendments/002-juan-diego-cuauhtlatoatzin.sexp) + (of/amendments/003-our-lady-of-guadalupe.sexp as of/amendments/003-our-lady-of-guadalupe.sexp) + (of/amendments/004-john-xxiii-john-paul-ii.sexp as of/amendments/004-john-xxiii-john-paul-ii.sexp) + (of/amendments/005-mary-magdalene-rank.sexp as of/amendments/005-mary-magdalene-rank.sexp) + (of/amendments/006-mary-mother-of-the-church.sexp as of/amendments/006-mary-mother-of-the-church.sexp) + (of/amendments/007-paul-vi.sexp as of/amendments/007-paul-vi.sexp) + (of/amendments/008-our-lady-of-loreto.sexp as of/amendments/008-our-lady-of-loreto.sexp) + (of/amendments/009-faustina-kowalska.sexp as of/amendments/009-faustina-kowalska.sexp) + (of/amendments/010-narek-avila-hildegard.sexp as of/amendments/010-narek-avila-hildegard.sexp) + (of/amendments/011-martha-mary-lazarus.sexp as of/amendments/011-martha-mary-lazarus.sexp) + (of/amendments/012-teresa-of-calcutta.sexp as of/amendments/012-teresa-of-calcutta.sexp) + (of/amendments/013-john-henry-newman.sexp as of/amendments/013-john-henry-newman.sexp))) |
