@@ -68,6 +68,9 @@ fn command_parser(
6868 CargoCommand :: Qemu {
6969 platform, example, ..
7070 }
71+ | CargoCommand :: ExampleSize {
72+ platform, example, ..
73+ }
7174 | CargoCommand :: Run {
7275 platform, example, ..
7376 } => {
@@ -108,7 +111,12 @@ fn command_parser(
108111 }
109112
110113 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+
112120 let expected_output_file = [ "ci" , "expected" , & platform_name, & run_file]
113121 . iter ( )
114122 . collect :: < PathBuf > ( )
@@ -148,8 +156,7 @@ fn command_parser(
148156 | CargoCommand :: Clippy { .. }
149157 | CargoCommand :: Doc { .. }
150158 | CargoCommand :: Test { .. }
151- | CargoCommand :: Book { .. }
152- | CargoCommand :: ExampleSize { .. } => {
159+ | CargoCommand :: Book { .. } => {
153160 let cargo_result = run_command ( command, output_mode, true ) ?;
154161 Ok ( cargo_result)
155162 }
@@ -429,6 +436,7 @@ pub fn build_and_check_size<'c>(
429436 platform : Platforms ,
430437 backend : Backends ,
431438 examples : & ' c [ String ] ,
439+ overwrite : bool ,
432440 arguments : & ' c Option < ExtraArguments > ,
433441) -> Vec < FinalRunResult < ' c > > {
434442 info ! ( "Measuring for platform: {platform:?}, backend: {backend:?}" ) ;
@@ -468,7 +476,7 @@ pub fn build_and_check_size<'c>(
468476
469477 [ cmd_build, cmd_size]
470478 } )
471- . map ( |cmd| ( globals, cmd, false ) ) ;
479+ . map ( |cmd| ( globals, cmd, overwrite ) ) ;
472480
473481 runner. run_and_coalesce ( )
474482}
0 commit comments