Skip to content

Commit

Permalink
Show a better error when container tests fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 13, 2023
1 parent fdc2904 commit 75bcada
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/cargo-test-support/src/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ impl Container {

let image_base = self.build_context.file_name().unwrap();
let image_name = format!("cargo-test-{}", image_base.to_str().unwrap());
let _lock = BUILD_LOCK.lock().unwrap();
let _lock = BUILD_LOCK
.lock()
.map_err(|_| panic!("previous docker build failed, unable to run test"));
ProcessBuilder::new("docker")
.args(&["build", "--tag", image_name.as_str()])
.arg(&self.build_context)
Expand Down

0 comments on commit 75bcada

Please sign in to comment.