diff options
-rw-r--r-- | crates/driver/src/driver.rs | 4 | ||||
-rw-r--r-- | crates/driver/src/main.rs | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/crates/driver/src/driver.rs b/crates/driver/src/driver.rs index c401f27..cc4bfbf 100644 --- a/crates/driver/src/driver.rs +++ b/crates/driver/src/driver.rs @@ -402,7 +402,7 @@ impl<'ctx> Driver<'ctx> { && self.tasks_running.is_empty() } - pub fn run(&mut self, runner: &Runner) -> Result<bool> { + pub fn run(&mut self, runner: &Runner, keep_going: bool) -> Result<bool> { let mut success = true; self.run_tasks(runner)?; @@ -411,7 +411,7 @@ impl<'ctx> Driver<'ctx> { if !self.wait_for_task()? { success = false; } - if success { + if success || keep_going { self.run_tasks(runner)?; } } diff --git a/crates/driver/src/main.rs b/crates/driver/src/main.rs index 44e5e1d..bd08f18 100644 --- a/crates/driver/src/main.rs +++ b/crates/driver/src/main.rs @@ -22,6 +22,9 @@ struct Opts { /// Defaults to the number of available CPUs #[clap(short, long)] jobs: Option<usize>, + /// Keep going after some tasks have failed + #[clap(short, long)] + keep_going: bool, /// The tasks to run #[clap(name = "task", required = true)] tasks: Vec<String>, @@ -62,7 +65,7 @@ fn main() { } let taskset = rsv.into_taskset(); let mut driver = driver::Driver::new(&ctx, taskset, force_run).unwrap(); - match driver.run(&runner) { + match driver.run(&runner, opts.keep_going) { Ok(success) => { if !success { std::process::exit(1); |