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 {
114
114
if let Some ( test_suite) = step. test_suites . last_mut ( ) {
115
115
test_suite. tests . push ( Test { name : name. to_string ( ) , outcome } ) ;
116
116
} 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" ) ;
120
118
}
121
119
}
122
120
@@ -194,7 +192,7 @@ impl BuildMetrics {
194
192
fn prepare_json_step ( & self , step : StepMetrics ) -> JsonNode {
195
193
let mut children = Vec :: new ( ) ;
196
194
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 ) ) ;
198
196
199
197
JsonNode :: RustbuildStep {
200
198
type_ : step. type_ ,
@@ -277,7 +275,7 @@ struct TestSuite {
277
275
#[ derive( Serialize , Deserialize ) ]
278
276
#[ serde( tag = "kind" , rename_all = "snake_case" ) ]
279
277
pub ( crate ) enum TestSuiteMetadata {
280
- Crate {
278
+ CargoPackage {
281
279
crates : Vec < String > ,
282
280
target : String ,
283
281
host : String ,
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ impl Step for Cargo {
319
319
320
320
#[ cfg( feature = "build-metrics" ) ]
321
321
builder. metrics . begin_test_suite (
322
- crate :: metrics:: TestSuiteMetadata :: Crate {
322
+ crate :: metrics:: TestSuiteMetadata :: CargoPackage {
323
323
crates : vec ! [ "cargo" . into( ) ] ,
324
324
target : self . host . triple . to_string ( ) ,
325
325
host : self . host . triple . to_string ( ) ,
@@ -2135,7 +2135,7 @@ fn run_cargo_test(
2135
2135
2136
2136
#[ cfg( feature = "build-metrics" ) ]
2137
2137
builder. metrics . begin_test_suite (
2138
- crate :: metrics:: TestSuiteMetadata :: Crate {
2138
+ crate :: metrics:: TestSuiteMetadata :: CargoPackage {
2139
2139
crates : crates. iter ( ) . map ( |c| c. to_string ( ) ) . collect ( ) ,
2140
2140
target : target. triple . to_string ( ) ,
2141
2141
host : compiler. host . triple . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments