diff options
Diffstat (limited to 'xtask/src/cargo_commands.rs')
-rw-r--r-- | xtask/src/cargo_commands.rs | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/xtask/src/cargo_commands.rs b/xtask/src/cargo_commands.rs index ead6eaa9..42895d81 100644 --- a/xtask/src/cargo_commands.rs +++ b/xtask/src/cargo_commands.rs @@ -302,7 +302,7 @@ pub fn cargo_book<'c>( /// Run examples /// /// Supports updating the expected output via the overwrite argument -pub fn run_test<'c>( +pub fn qemu_run_examples<'c>( globals: &Globals, cargoarg: &'c Option<&'c str>, backend: Backends, @@ -312,31 +312,30 @@ pub fn run_test<'c>( let target = backend.to_target(); let features = Some(target.and_features(backend.to_rtic_feature())); - examples_iter(examples) - .map(|example| { - let cmd = CargoCommand::ExampleBuild { - cargoarg: &Some("--quiet"), - example, - target, - features: features.clone(), - mode: BuildMode::Release, - }; - - if let Err(err) = command_parser(globals, &cmd, false) { - error!("{err}"); - } + let build = examples_iter(examples).map(|example| { + let cmd_build = CargoCommand::ExampleBuild { + // We need to be in the correct + cargoarg: &None, + example, + target, + features: features.clone(), + mode: BuildMode::Release, + }; + (globals, cmd_build, overwrite) + }); - let cmd = CargoCommand::Qemu { - cargoarg, - example, - target, - features: features.clone(), - mode: BuildMode::Release, - }; + let run = examples_iter(examples).map(|example| { + let cmd_qemu = CargoCommand::Qemu { + cargoarg, + example, + target, + features: features.clone(), + mode: BuildMode::Release, + }; + (globals, cmd_qemu, overwrite) + }); - (globals, cmd, overwrite) - }) - .run_and_coalesce() + build.chain(run).run_and_coalesce() } /// Check the binary sizes of examples |