runs_root

Function runs_root 

Source
pub fn runs_root() -> PathBuf
Expand description

Resolve the parent directory that holds all test-run subdirectories.

Resolution order:

  1. crate::KTSTR_RUNS_ROOT_ENV (absolute) — the cargo ktstr orchestrator stamps this once at startup so its footer / stats / replay reads AND the child test processes’ sidecar writes resolve the SAME directory regardless of CWD. This is the primary path under cargo ktstr.
  2. {cargo target directory}/ktstr — the raw cargo test / cargo nextest run fallback, with the target directory resolved by cargo_target_dir (which asks cargo, so a .cargo/config [build] target-dir is honored, not just CARGO_TARGET_DIR). Only this unpinned path pays the one-per-process cargo metadata spawn; the orchestrator pins the absolute override above and never reaches it.

Used by cargo ktstr stats / replay and the post-run footer to enumerate runs without reconstructing a specific run key.