Skip to main content

run_compile_and_test_with_timeout

Function run_compile_and_test_with_timeout 

Source
fn run_compile_and_test_with_timeout(
    config: Arc<Config>,
    evm_opts: &EvmOpts,
    budget: Duration,
    temp_dir: TempDir,
    shared_state: &Arc<SharedMutationState>,
    filter_args: Arc<FilterArgs>,
    selected_sources_relative: Arc<Vec<PathBuf>>,
    isolate: bool,
) -> MutationResult
Expand description

Run compile_and_test on a worker thread and wait at most budget for it to complete. Returns TimedOut on overrun and Invalid on infrastructure errors / panics.

The worker takes ownership of temp_dir so the underlying workspace directory is only dropped when the worker thread actually exits. On timeout the JoinHandle is parked in shared_state.pending_workers and joined at the end of the parallel run.