Skip to content

Commit d7dc01c

Browse files
committed
Report errors during crate preparation in collector
1 parent 5fb9877 commit d7dc01c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

collector/src/benchmark/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,18 @@ impl Benchmark {
253253
for (profile, prep_dir) in &profile_dirs {
254254
let server = server.clone();
255255
s.spawn::<_, anyhow::Result<()>>(move |_| {
256+
// Panic the thread if an error occurs to make sure that the whole scope will
257+
// also panic if there was some error.
256258
self.mk_cargo_process(compiler, prep_dir.path(), *profile)
257259
.jobserver(server)
258-
.run_rustc(false)?;
260+
.run_rustc(false)
261+
.unwrap();
259262
Ok(())
260263
});
261264
}
262265
Ok(())
263266
})
264-
.unwrap()?;
267+
.expect("Preparation has failed")?;
265268

266269
for (profile, prep_dir) in profile_dirs {
267270
eprintln!("Running {}: {:?} + {:?}", self.name, profile, scenarios);

0 commit comments

Comments
 (0)