Skip to content

Commit cfabfe5

Browse files
committed
test: Auto-redact target dir hashes
1 parent 67aad4f commit cfabfe5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/cargo-test-support/src/compare.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
179179
regex!(r"home/\.cargo/registry/src/-(?<redacted>[a-z0-9]+)"),
180180
)
181181
.unwrap();
182+
subs.insert(
183+
"[HASH]",
184+
regex!(r"\.cargo/target/(?<redacted>[0-9a-f]{2}/[0-9a-f]{14})"),
185+
)
186+
.unwrap();
182187
subs.insert("[HASH]", regex!(r"/[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})"))
183188
.unwrap();
184189
subs.insert("[HOST_TARGET]", rustc_host()).unwrap();

0 commit comments

Comments
 (0)