Skip to content

Commit

Permalink
Start jobserver a little later
Browse files Browse the repository at this point in the history
Wait until we're sure we have mutants to test and are about to begin.
  • Loading branch information
sourcefrog committed Nov 6, 2024
1 parent 88a7149 commit 253f84a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/lab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ pub fn test_mutants(
) -> Result<LabOutcome> {
let start_time = Instant::now();
console.set_debug_log(output_dir.open_debug_log()?);
let jobserver = options
.jobserver
.then(|| {
let n_tasks = options.jobserver_tasks.unwrap_or_else(num_cpus::get);
debug!(n_tasks, "starting jobserver");
jobserver::Client::new(n_tasks)
})
.transpose()
.context("Start jobserver")?;
if options.shuffle {
fastrand::shuffle(&mut mutants);
}
Expand All @@ -61,6 +52,15 @@ pub fn test_mutants(
false => BuildDir::copy_from(workspace_dir, options.gitignore, options.leak_dirs, console)?,
};

let jobserver = options
.jobserver
.then(|| {
let n_tasks = options.jobserver_tasks.unwrap_or_else(num_cpus::get);
debug!(n_tasks, "starting jobserver");
jobserver::Client::new(n_tasks)
})
.transpose()
.context("Start jobserver")?;
let timeouts = match options.baseline {
BaselineStrategy::Run => {
let outcome = test_scenario(
Expand Down

0 comments on commit 253f84a

Please sign in to comment.