The runner copy leaves edith — it was never this repo's tooling
Browse files at this commit0c9d76ce3225c12c91552954ecde430db0d16f11Parent: 4478d52- chore
- the runner copy leaves edith — it was never this repo's tooling
1 changed file +0 -21
- scripts/memguard-runner.sh +0 -21
scripts/memguard-runner.shdeleted+0 -21
| @@ -1,21 +0,0 @@ | |||
| 1 | -#!/usr/bin/env bash | ||
| 2 | -# Wraps a test/bin invocation in a transient user cgroup scope so a runaway | ||
| 3 | -# allocation dies inside its own cgroup instead of triggering a machine-wide | ||
| 4 | -# OOM kill. Used as the cargo target runner (see .cargo/config.toml) so every | ||
| 5 | -# `cargo test`/`cargo run` invocation of this workspace is capped, from any | ||
| 6 | -# checkout (main repo or worktree). | ||
| 7 | -set -euo pipefail | ||
| 8 | - | ||
| 9 | -if [ "${EC_NOMEMGUARD:-0}" = "1" ]; then | ||
| 10 | - echo "memguard-runner: EC_NOMEMGUARD=1, running without memory cap" >&2 | ||
| 11 | - exec "$@" | ||
| 12 | -fi | ||
| 13 | - | ||
| 14 | -if ! systemd-run --user --scope --quiet -p MemoryMax=10G true >/dev/null 2>&1; then | ||
| 15 | - echo "memguard-runner: systemd-run --user --scope unavailable, running without memory cap" >&2 | ||
| 16 | - exec "$@" | ||
| 17 | -fi | ||
| 18 | - | ||
| 19 | -exec systemd-run --user --scope --quiet --same-dir \ | ||
| 20 | - -p MemoryMax=10G -p MemorySwapMax=2G \ | ||
| 21 | - -- "$@" | ||