diff --git a/tests/tools/test_install_scripts.py b/tests/tools/test_install_scripts.py index f876704f6..055707206 100644 --- a/tests/tools/test_install_scripts.py +++ b/tests/tools/test_install_scripts.py @@ -4,7 +4,6 @@ Reusable shell logic replicated inline from ``tools/get_petsc.sh`` and ``tools/get_spider.sh``: -- ``portable_realpath()``: cross-platform path resolution - ERR trap: exit-code and step-name capture - Platform detection: PETSC_ARCH assignment - Homebrew prefix fallback: architecture-aware default @@ -13,9 +12,13 @@ Blocks lifted out of the shipped scripts at run time, so that rewording a script re-runs its cases against the new text: +- ``portable_realpath()``: cross-platform path resolution, including a + destination that does not exist yet, plus the invariant that every + ``get_*.sh`` copy of the helper carries the same text - ``tools/get_aragog.sh``: the dirty-checkout guard shared across ``get_*.sh`` - ``tools/get_socrates.sh``: the portable-flag rewrite, its post-build flag - check, and the conditional AGNI-wrapper rebuild note + check, the install-path resolution, and the conditional AGNI-wrapper + rebuild note Also pins invariants that live in checked-in configuration and documentation rather than in shell, each of which fails silently when its counterpart moves: @@ -48,17 +51,30 @@ # --------------------------------------------------------------------------- # Helper: extract portable_realpath function from a script # --------------------------------------------------------------------------- +def _extract_shell_function(script: str, name: str) -> str: + """Return the shipped bash source of ``name`` in ``tools/