@@ -225,16 +225,23 @@ fn aggregate_tests(metrics: &JsonRoot) -> TestSuiteData {
225
225
// Poor man's detection of doctests based on the "(line XYZ)" suffix
226
226
let is_doctest = matches ! ( suite. metadata, TestSuiteMetadata :: CargoPackage { .. } )
227
227
&& test. name . contains ( "(line" ) ;
228
- let test_entry = Test { name : normalize_test_name ( & test. name ) , is_doctest } ;
228
+ let test_entry = Test { name : generate_test_name ( & test. name , & suite ) , is_doctest } ;
229
229
tests. insert ( test_entry, test. outcome . clone ( ) ) ;
230
230
}
231
231
}
232
232
TestSuiteData { tests }
233
233
}
234
234
235
- /// Normalizes Windows-style path delimiters to Unix-style paths.
236
- fn normalize_test_name ( name : & str ) -> String {
237
- name. replace ( '\\' , "/" )
235
+ /// Normalizes Windows-style path delimiters to Unix-style paths
236
+ /// and adds suite metadata to the test name.
237
+ fn generate_test_name ( name : & str , suite : & TestSuite ) -> String {
238
+ let name = name. replace ( '\\' , "/" ) ;
239
+ let stage = match suite. metadata {
240
+ TestSuiteMetadata :: CargoPackage { stage, .. } => stage,
241
+ TestSuiteMetadata :: Compiletest { stage, .. } => stage,
242
+ } ;
243
+
244
+ format ! ( "{name} (stage {stage})" )
238
245
}
239
246
240
247
/// Prints test changes in Markdown format to stdout.
0 commit comments