test: make the gate usable on macOS
- ty: pin python-platform to linux. The tests call os.pidfd_open behind a skip, and ty on macOS reported it unresolved, which failed the gate and the pre-commit hook before any suite ran. - e2e harness: resolve the scratch root. The daemon reports realpaths, so on macOS (/tmp -> /private/tmp) two catalog and extensions tests compared unresolved paths against resolved ones and failed on a clean checkout. - snapshot-daemon.sh: start from an empty output directory. Reusing one kept the previous beams (cp -R nested into the old ebin) and let `ln -s` follow the old priv link into the checkout as priv/priv.
5 unmodified lines67891011121314154 unmodified lines5 unmodified linesselect = ["E4", "E7", "E9", "F"]
[tool.ty.environment]python-version = "3.11"# The tests use Linux-only calls, such as os.pidfd_open, behind a skip.python-platform = "linux"extra-paths = ["priv/python", "test", "test/harness", "test/e2e"]
[tool.ty.src]include = ["priv/python", "test", "cli/internal/storage/maintenance.py"]4 unmodified lines5 unmodified lines67891011121314151614 unmodified lines5 unmodified lines# code under a daemon that is still loading modules.set -euo pipefailroot="$(cd "$(dirname "$0")/.." && pwd)"out="$1"# A reused directory would keep the previous beams, and `ln -s` would follow its# old priv link into the checkout.rm -rf "$out"(cd "$root" && gleam build) >&2mkdir -p "$out"for ebin in "$root"/build/dev/erlang/*/ebin; do package="$(dirname "$ebin")"14 unmodified lines483 unmodified linesExpand all484485486487488488489490491492493459 unmodified linesExpand all483 unmodified linesExpand all "run E2E tests through test/e2e/run.py, not an interactive interpreter" ) self.concurrent = concurrent self.lock = threading.RLock() # Resolved, so a path the daemon reports through a symlink (macOS /tmp) matches. self.root = Path(tempfile.mkdtemp(prefix=f"{name}-")) self.root = Path(tempfile.mkdtemp(prefix=f"{name}-")).resolve() self.home = self.root / "home" self.home.mkdir() (self.root / "user-home").mkdir() # Nothing of the developer's albedo setup reaches the daemon.459 unmodified linesExpand all