From 0c75e97497b58aaa6daed3f38685cfd4a173b17b Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Tue, 29 Sep 2026 01:04:48 -0700 Subject: [PATCH] fix(test): build compile_scratch_root paths from fbuild_paths constants #1582's test spelled '.fbuild/build' by hand, which Dylint's ban_raw_fbuild_path rejects; main's Dylint run was cancelled so it landed red and now fails every PR's Dylint check. Same assertions, built from FBUILD_DIR_NAME / BUILD_DIR_NAME. --- crates/fbuild-build-engine/src/compiler_tests.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/fbuild-build-engine/src/compiler_tests.rs b/crates/fbuild-build-engine/src/compiler_tests.rs index f1d9411e..b100a470 100644 --- a/crates/fbuild-build-engine/src/compiler_tests.rs +++ b/crates/fbuild-build-engine/src/compiler_tests.rs @@ -800,13 +800,17 @@ fn test_build_rebuild_signature_strips_build_unflags() { #[test] fn compile_scratch_root_is_the_object_dir_not_the_project() { let project = Path::new("/proj"); + let rel_obj_dir = Path::new(fbuild_paths::FBUILD_DIR_NAME) + .join(fbuild_paths::BUILD_DIR_NAME) + .join("o"); + let abs_obj_dir = project.join(&rel_obj_dir); assert_eq!( - compile_scratch_root(Some(project), Path::new("/proj/.fbuild/build/o/a.o")), - PathBuf::from("/proj/.fbuild/build/o") + compile_scratch_root(Some(project), &abs_obj_dir.join("a.o")), + abs_obj_dir ); assert_eq!( - compile_scratch_root(Some(project), Path::new(".fbuild/build/o/a.o")), - PathBuf::from("/proj/.fbuild/build/o") + compile_scratch_root(Some(project), &rel_obj_dir.join("a.o")), + abs_obj_dir ); assert_eq!( compile_scratch_root(Some(project), Path::new("a.o")),