From 6bdd1416ea7e945fefdc64ab48d8c88e8d8f3ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 23 Oct 2026 15:43:35 +0300 Subject: [PATCH] cargo runner: find memguard-runner.sh without .git cargo-mutants scratch copies and remote-run rsyncs have no .git, so `git rev-parse` failed and the test runner never started. Fall back to walking up from the cwd. --- .cargo/config.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 52a50aad..4c0db30a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,8 +5,10 @@ # (cargo does not resolve runner paths relative to this file, and an absolute # 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\" \"$@\"", "--"] +# dir instead of the repo. Strip the leaked git vars first. Trees without +# .git (cargo-mutants scratch copies, remote-run rsyncs) walk up from the cwd to +# the first dir holding the runner instead. +runner = ["bash", "-c", "root=$(env -u GIT_DIR -u GIT_WORK_TREE -u GIT_INDEX_FILE git rev-parse --show-toplevel 2>/dev/null) || { root=$PWD; while [ \"$root\" != / ] && [ ! -x \"$root/scripts/memguard-runner.sh\" ]; do root=$(dirname \"$root\"); done; }; exec \"$root/scripts/memguard-runner.sh\" \"$@\"", "--"] [env] # The AV1 rate-target tests keep several frames' worth of encoder state on the