diff --git a/crates/aura-cli/tests/project_sweep_campaign.rs b/crates/aura-cli/tests/project_sweep_campaign.rs index 1ac77d8..35d848d 100644 --- a/crates/aura-cli/tests/project_sweep_campaign.rs +++ b/crates/aura-cli/tests/project_sweep_campaign.rs @@ -63,11 +63,15 @@ fn aura_in(dir: &Path, args: &[&str]) -> Output { /// `blueprints/scaled_open.json`. Returns the project dir. `OnceLock` so the /// expensive scaffold+build happens once per test binary; the node crate's /// path-dep resolves into this checkout (the baked engine root), like -/// `project_new.rs`. +/// `project_new.rs`. The base is a FIXED name under `CARGO_TARGET_TMPDIR` +/// (real disk, reclaimed by `cargo clean`), not a pid-suffixed tempdir: the +/// wipe below must hit the PREVIOUS run's copy, else every test-binary run +/// leaks the ~66 MB built scaffold — 159 of those filled the 16 GB /tmp +/// tmpfs to 100 % (#257). fn built_scale_project() -> &'static PathBuf { static BUILT: OnceLock = OnceLock::new(); BUILT.get_or_init(|| { - let base = std::env::temp_dir().join(format!("aura-235-{}", std::process::id())); + let base = Path::new(env!("CARGO_TARGET_TMPDIR")).join("aura-235-knob-lab"); let _ = std::fs::remove_dir_all(&base); std::fs::create_dir_all(&base).expect("create scaffold base");