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 875a25f commit 190ef86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/cargo-test-support/src/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
regex!("home/\\.cargo/registry/src/-(?<redacted>[a-z0-9]+)"),
)
.unwrap();
subs.insert("[HASH]", regex!("/[a-z0-9\\-_]+-(?<redacted>[0-9a-f]{16})"))
.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 190ef86

Please sign in to comment.