Scan pushed directories for tests and run them.
(&mut self)
| 355 | |
| 356 | /// Scan pushed directories for tests and run them. |
| 357 | pub fn run(&mut self) -> anyhow::Result<()> { |
| 358 | self.scan_dirs(IsPass::NotPass); |
| 359 | self.schedule_jobs(); |
| 360 | self.report_slow_tests(); |
| 361 | self.drain_threads(); |
| 362 | |
| 363 | println!("{} tests", self.tests.len()); |
| 364 | match self.errors { |
| 365 | 0 => Ok(()), |
| 366 | 1 => anyhow::bail!("1 failure"), |
| 367 | n => anyhow::bail!("{n} failures"), |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | /// Scan pushed directories for tests and run specified passes from commandline on them. |
| 372 | pub fn run_passes(&mut self, passes: &[String], target: &str) -> anyhow::Result<()> { |