Skip to content

Commit

Permalink
Auto merge of #14161 - choznerol:issue-14039-snapshot-port-freshness,…
Browse files Browse the repository at this point in the history
… r=weihanglo

test: Auto-redact `... after last build at ...`; Migrate `freshness` to Snapbox
  • Loading branch information
bors committed Jul 3, 2024
2 parents 5d5c524 + b8a62da commit 753ae28
Show file tree
Hide file tree
Showing 2 changed files with 710 additions and 496 deletions.
10 changes: 10 additions & 0 deletions crates/cargo-test-support/src/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
regex!(r"ns/iter \(\+/- (?<redacted>[0-9]+(\.[0-9]+)?)\)"),
)
.unwrap();

// Following 3 subs redact:
// "1719325877.527949100s, 61549498ns after last build at 1719325877.466399602s"
// "1719503592.218193216s, 1h 1s after last build at 1719499991.982681034s"
// into "[DIRTY_REASON_NEW_TIME], [DIRTY_REASON_DIFF] after last build at [DIRTY_REASON_OLD_TIME]"
subs.insert(
"[TIME_DIFF_AFTER_LAST_BUILD]",
regex!(r"(?<redacted>[0-9]+(\.[0-9]+)?s, (\s?[0-9]+(\.[0-9]+)?(s|ns|h))+ after last build at [0-9]+(\.[0-9]+)?s)"),
)
.unwrap();
}

static MIN_LITERAL_REDACTIONS: &[(&str, &str)] = &[
Expand Down
Loading

0 comments on commit 753ae28

Please sign in to comment.