From 5ada964e76f05159473458982b6161e018a8a07d Mon Sep 17 00:00:00 2001 From: dawn <90008@klbr.net> Date: Wed, 30 Sep 2026 13:55:50 +0300 Subject: [PATCH] [bench] keep the checkout path out of the bench binary --- benches/repo.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/benches/repo.rs b/benches/repo.rs index 6a41731..d9d1fd1 100644 --- a/benches/repo.rs +++ b/benches/repo.rs @@ -60,10 +60,12 @@ impl Repo { } } +/// relative, because cargo runs benches from the package root: an absolute path baked in here +/// would make builds of the same code from two checkouts lay their code out differently fn data_dir() -> PathBuf { std::env::var_os("HYDRANT_BENCH_DATA") .map(PathBuf::from) - .unwrap_or_else(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("target/bench-data")) + .unwrap_or_else(|| PathBuf::from("target/bench-data")) } fn repos() -> &'static [Repo] { -- 2.51.2