diff --git a/.cargo/config.toml b/.cargo/config.toml index ab0d82b2..52a50aad 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,8 +3,10 @@ # allocation gets killed inside its own cgroup instead of OOM-killing the # machine. Located via `git rev-parse --show-toplevel` from the invoker's cwd # (cargo does not resolve runner paths relative to this file, and an absolute -# path would break other worktree checkouts of this repo). -runner = ["bash", "-c", "root=$(git rev-parse --show-toplevel) && exec \"$root/scripts/memguard-runner.sh\" \"$@\"", "--"] +# path would break other worktree checkouts of this repo). `git bisect run` +# exports GIT_DIR, which would make that rev-parse resolve the test package +# dir instead of the repo. Strip the leaked git vars first. +runner = ["bash", "-c", "root=$(env -u GIT_DIR -u GIT_WORK_TREE -u GIT_INDEX_FILE git rev-parse --show-toplevel) && exec \"$root/scripts/memguard-runner.sh\" \"$@\"", "--"] [env] # The AV1 rate-target tests keep several frames' worth of encoder state on the