Function run_all_examples

Source
pub fn run_all_examples(
    manager: Arc<ProcessManager>,
    cli: &Cli,
    filtered_targets: &[CargoTarget],
) -> Result<bool>
Expand description

Runs all filtered targets with prebuild, child process management, and timeout‐based termination.

If the CLI flag pre_build is enabled, this function first prebuilds all targets by invoking cargo build with the appropriate flags (using --example or --bin and, for extended targets, the --manifest-path flag). Then it spawns a child process for each target using cargo run, waits for the duration specified by cli.wait, kills the child process, and then checks its output.

§Parameters

  • cli: A reference to the CLI configuration (containing flags like pre_build, wait, and extra arguments).
  • filtered_targets: A slice of Example instances representing the targets to run.

§Errors

Returns an error if the prebuild step fails or if any child process fails to spawn or complete.