From 9d28028e17b7601ead077844796e115136978623 Mon Sep 17 00:00:00 2001 From: tignear Date: Tue, 27 Oct 2026 05:55:11 +0900 Subject: [PATCH] fix(test-suite): avoid rebuilding for absent Cargo configuration Do not register nonexistent optional Cargo configuration files as build script inputs. Cargo treats those paths as always dirty, rebuilding the suite and its consumers on successive invocations; one observed CI run spent 2m47s rebuilding before cocotb. Existing inputs remain registered and hashed by file(). Validated with repeated Cargo checks (the unchanged second invocation is fresh), both incremental CLI regression tests, crate clippy with verilator and icarus features, and formatting. Change-Id: I91831975d298ea8bbe3d4ee59768a08ca42196bc --- crates/celox-test-suite/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/celox-test-suite/build.rs b/crates/celox-test-suite/build.rs index 3d94cad2b64..978699e3e9b 100644 --- a/crates/celox-test-suite/build.rs +++ b/crates/celox-test-suite/build.rs @@ -165,7 +165,9 @@ mod fingerprint { ".cargo/config", ] { let path = workspace.join(name); - println!("cargo:rerun-if-changed={}", path.display()); + // file() registers existing inputs. Registering a missing optional + // Cargo config makes Cargo rerun this script on every invocation. + // Cargo itself tracks settings that affect compilation. if path.exists() { file(&mut hash, &path, name)?; }