Skip to content

Commit

Permalink
test: Auto-redact file hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Muscraft committed Jun 12, 2024
1 parent e28c99d commit b90ba01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/cargo-test-support/src/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
regex::Regex::new("home/\\.cargo/registry/src/-(?<redacted>[a-z0-9]+)").unwrap(),
)
.unwrap();
subs.insert(
"[HASH]",
regex::Regex::new(r"[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})").unwrap(),
)
.unwrap();
subs.insert("[HOST_TARGET]", rustc_host()).unwrap();
if let Some(alt_target) = try_alternate() {
subs.insert("[ALT_TARGET]", alt_target).unwrap();
Expand Down

0 comments on commit b90ba01

Please sign in to comment.