test: Auto-redact target dir hashes

This commit is contained in:
eth3lbert 2024-06-23 10:32:58 +08:00
parent 67aad4f242
commit cfabfe5467
No known key found for this signature in database

View file

@ -179,6 +179,11 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
regex!(r"home/\.cargo/registry/src/-(?<redacted>[a-z0-9]+)"),
)
.unwrap();
subs.insert(
"[HASH]",
regex!(r"\.cargo/target/(?<redacted>[0-9a-f]{2}/[0-9a-f]{14})"),
)
.unwrap();
subs.insert("[HASH]", regex!(r"/[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})"))
.unwrap();
subs.insert("[HOST_TARGET]", rustc_host()).unwrap();