File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,27 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
200200 regex ! ( r"ns/iter \(\+/- (?<redacted>[0-9]+(\.[0-9]+)?)\)" ) ,
201201 )
202202 . unwrap ( ) ;
203+
204+ // Following 3 subs redact:
205+ // "1719325877.527949100s, 61549498ns after last build at 1719325877.466399602s"
206+ // "1719503592.218193216s, 1h 1s after last build at 1719499991.982681034s"
207+ // into "[DIRTY_REASON_NEW_TIME], [DIRTY_REASON_DIFF] after last build at [DIRTY_REASON_OLD_TIME]"
208+ // The ordering of these 3 subs matters.
209+ subs. insert (
210+ "[DIRTY_REASON_NEW_TIME]" ,
211+ 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)" ) ,
212+ )
213+ . unwrap ( ) ;
214+ subs. insert (
215+ "[DIRTY_REASON_DIFF]" ,
216+ regex ! ( r"\[\w+\], (?<redacted>(\s?[0-9]+(\.[0-9]+)?(s|ns|h))+) after last build at ([0-9]+(\.[0-9]+)?s)" ) ,
217+ )
218+ . unwrap ( ) ;
219+ subs. insert (
220+ "[DIRTY_REASON_OLD_TIME]" ,
221+ regex ! ( r"\[\w+\], \[\w+\] after last build at (?<redacted>[0-9]+(\.[0-9]+)?s)" ) ,
222+ )
223+ . unwrap ( ) ;
203224}
204225
205226static MIN_LITERAL_REDACTIONS : & [ ( & str , & str ) ] = & [
You can’t perform that action at this time.
0 commit comments