@@ -68,6 +68,9 @@ fn command_parser(
68
68
CargoCommand :: Qemu {
69
69
platform, example, ..
70
70
}
71
+ | CargoCommand :: ExampleSize {
72
+ platform, example, ..
73
+ }
71
74
| CargoCommand :: Run {
72
75
platform, example, ..
73
76
} => {
@@ -108,7 +111,12 @@ fn command_parser(
108
111
}
109
112
110
113
let platform_name = platform. name ( ) ;
111
- let run_file = format ! ( "{example}.run" ) ;
114
+ let run_file = if let CargoCommand :: ExampleSize { .. } = * command {
115
+ format ! ( "{example}.size" )
116
+ } else {
117
+ format ! ( "{example}.run" )
118
+ } ;
119
+
112
120
let expected_output_file = [ "ci" , "expected" , & platform_name, & run_file]
113
121
. iter ( )
114
122
. collect :: < PathBuf > ( )
@@ -148,8 +156,7 @@ fn command_parser(
148
156
| CargoCommand :: Clippy { .. }
149
157
| CargoCommand :: Doc { .. }
150
158
| CargoCommand :: Test { .. }
151
- | CargoCommand :: Book { .. }
152
- | CargoCommand :: ExampleSize { .. } => {
159
+ | CargoCommand :: Book { .. } => {
153
160
let cargo_result = run_command ( command, output_mode, true ) ?;
154
161
Ok ( cargo_result)
155
162
}
@@ -429,6 +436,7 @@ pub fn build_and_check_size<'c>(
429
436
platform : Platforms ,
430
437
backend : Backends ,
431
438
examples : & ' c [ String ] ,
439
+ overwrite : bool ,
432
440
arguments : & ' c Option < ExtraArguments > ,
433
441
) -> Vec < FinalRunResult < ' c > > {
434
442
info ! ( "Measuring for platform: {platform:?}, backend: {backend:?}" ) ;
@@ -468,7 +476,7 @@ pub fn build_and_check_size<'c>(
468
476
469
477
[ cmd_build, cmd_size]
470
478
} )
471
- . map ( |cmd| ( globals, cmd, false ) ) ;
479
+ . map ( |cmd| ( globals, cmd, overwrite ) ) ;
472
480
473
481
runner. run_and_coalesce ( )
474
482
}
0 commit comments