cargo runner: find memguard-runner.sh without .git
Browse files at this commit6bdd1416ea7e945fefdc64ab48d8c88e8d8f3ce4Parent: b7434a21 changed file +4 -2
- .cargo/config.toml +4 -2
.cargo/config.tomlmodified+4 -2
| @@ -5,8 +5,10 @@ | ||
| 5 | 5 | # (cargo does not resolve runner paths relative to this file, and an absolute |
| 6 | 6 | # path would break other worktree checkouts of this repo). `git bisect run` |
| 7 | 7 | # exports GIT_DIR, which would make that rev-parse resolve the test package |
| 8 | -# dir instead of the repo. Strip the leaked git vars first. | |
| 9 | -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\" \"$@\"", "--"] | |
| 8 | +# dir instead of the repo. Strip the leaked git vars first. Trees without | |
| 9 | +# .git (cargo-mutants scratch copies, remote-run rsyncs) walk up from the cwd to | |
| 10 | +# the first dir holding the runner instead. | |
| 11 | +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\" \"$@\"", "--"] | |
| 10 | 12 | |
| 11 | 13 | [env] |
| 12 | 14 | # The AV1 rate-target tests keep several frames' worth of encoder state on the |