#![cfg_attr(coverage_nightly, coverage(off))]
use anyhow::{Context, Result};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{Duration, Instant};
use tokio::fs;
use tokio::time::timeout;
use super::types::{Mutant, MutantStatus, MutationResult};
const DEFAULT_TIMEOUT_SECS: u64 = 600;
#[derive(Clone)]
pub struct MutantExecutor {
timeout: Duration,
work_dir: PathBuf,
}
impl MutantExecutor {
pub fn new(work_dir: PathBuf) -> Self {
Self {
timeout: Duration::from_secs(DEFAULT_TIMEOUT_SECS),
work_dir,
}
}
pub fn with_timeout(mut self, timeout_secs: u64) -> Self {
self.timeout = Duration::from_secs(timeout_secs);
self
}
}
include!("executor_single.rs");
include!("executor_parallel.rs");
include!("executor_resumable.rs");
include!("executor_helpers.rs");
#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg(test)]
mod tests {
use super::*;
include!("executor_tests.rs");
}