File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,7 @@ impl BuildMetrics {
114114 if let Some ( test_suite) = step. test_suites . last_mut ( ) {
115115 test_suite. tests . push ( Test { name : name. to_string ( ) , outcome } ) ;
116116 } else {
117- panic ! (
118- "metrics.record_test() called without calling metrics.record_test_suite() first"
119- ) ;
117+ panic ! ( "metrics.record_test() called without calling metrics.begin_test_suite() first" ) ;
120118 }
121119 }
122120
@@ -194,7 +192,7 @@ impl BuildMetrics {
194192 fn prepare_json_step ( & self , step : StepMetrics ) -> JsonNode {
195193 let mut children = Vec :: new ( ) ;
196194 children. extend ( step. children . into_iter ( ) . map ( |child| self . prepare_json_step ( child) ) ) ;
197- children. extend ( step. test_suites . into_iter ( ) . map ( |suite| JsonNode :: TestSuite ( suite ) ) ) ;
195+ children. extend ( step. test_suites . into_iter ( ) . map ( JsonNode :: TestSuite ) ) ;
198196
199197 JsonNode :: RustbuildStep {
200198 type_ : step. type_ ,
@@ -277,7 +275,7 @@ struct TestSuite {
277275#[ derive( Serialize , Deserialize ) ]
278276#[ serde( tag = "kind" , rename_all = "snake_case" ) ]
279277pub ( crate ) enum TestSuiteMetadata {
280- Crate {
278+ CargoPackage {
281279 crates : Vec < String > ,
282280 target : String ,
283281 host : String ,
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ impl Step for Cargo {
319319
320320 #[ cfg( feature = "build-metrics" ) ]
321321 builder. metrics . begin_test_suite (
322- crate :: metrics:: TestSuiteMetadata :: Crate {
322+ crate :: metrics:: TestSuiteMetadata :: CargoPackage {
323323 crates : vec ! [ "cargo" . into( ) ] ,
324324 target : self . host . triple . to_string ( ) ,
325325 host : self . host . triple . to_string ( ) ,
@@ -2135,7 +2135,7 @@ fn run_cargo_test(
21352135
21362136 #[ cfg( feature = "build-metrics" ) ]
21372137 builder. metrics . begin_test_suite (
2138- crate :: metrics:: TestSuiteMetadata :: Crate {
2138+ crate :: metrics:: TestSuiteMetadata :: CargoPackage {
21392139 crates : crates. iter ( ) . map ( |c| c. to_string ( ) ) . collect ( ) ,
21402140 target : target. triple . to_string ( ) ,
21412141 host : compiler. host . triple . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments