@@ -88,6 +88,9 @@ struct Renderer<'a> {
88
88
builder : & ' a Builder < ' a > ,
89
89
tests_count : Option < usize > ,
90
90
executed_tests : usize ,
91
+ /// Number of tests that were skipped due to already being up-to-date
92
+ /// (i.e. no relevant changes occurred since they last ran).
93
+ up_to_date_tests : usize ,
91
94
terse_tests_in_line : usize ,
92
95
}
93
96
@@ -100,6 +103,7 @@ impl<'a> Renderer<'a> {
100
103
builder,
101
104
tests_count : None ,
102
105
executed_tests : 0 ,
106
+ up_to_date_tests : 0 ,
103
107
terse_tests_in_line : 0 ,
104
108
}
105
109
}
@@ -127,6 +131,12 @@ impl<'a> Renderer<'a> {
127
131
}
128
132
}
129
133
}
134
+
135
+ if self . up_to_date_tests > 0 {
136
+ let n = self . up_to_date_tests ;
137
+ let s = if n > 1 { "s" } else { "" } ;
138
+ println ! ( "help: ignored {n} up-to-date test{s}; use `--force-rerun` to prevent this\n " ) ;
139
+ }
130
140
}
131
141
132
142
/// Renders the stdout characters one by one
@@ -149,6 +159,11 @@ impl<'a> Renderer<'a> {
149
159
fn render_test_outcome ( & mut self , outcome : Outcome < ' _ > , test : & TestOutcome ) {
150
160
self . executed_tests += 1 ;
151
161
162
+ // Keep this in sync with the "up-to-date" ignore message inserted by compiletest.
163
+ if let Outcome :: Ignored { reason : Some ( "up-to-date" ) } = outcome {
164
+ self . up_to_date_tests += 1 ;
165
+ }
166
+
152
167
#[ cfg( feature = "build-metrics" ) ]
153
168
self . builder . metrics . record_test (
154
169
& test. name ,
0 commit comments