@@ -225,16 +225,23 @@ fn aggregate_tests(metrics: &JsonRoot) -> TestSuiteData {
225225 // Poor man's detection of doctests based on the "(line XYZ)" suffix
226226 let is_doctest = matches ! ( suite. metadata, TestSuiteMetadata :: CargoPackage { .. } )
227227 && 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 } ;
229229 tests. insert ( test_entry, test. outcome . clone ( ) ) ;
230230 }
231231 }
232232 TestSuiteData { tests }
233233}
234234
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})" )
238245}
239246
240247/// Prints test changes in Markdown format to stdout.
0 commit comments