diff --git a/Cargo.lock b/Cargo.lock index b3cfece1b82..3c519079b64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3814,7 +3814,7 @@ dependencies = [ [[package]] name = "mithril-end-to-end" -version = "0.4.54" +version = "0.4.55" dependencies = [ "anyhow", "async-recursion", diff --git a/mithril-test-lab/mithril-end-to-end/Cargo.toml b/mithril-test-lab/mithril-end-to-end/Cargo.toml index 83fb2bc1ec0..a01917b2891 100644 --- a/mithril-test-lab/mithril-end-to-end/Cargo.toml +++ b/mithril-test-lab/mithril-end-to-end/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-end-to-end" -version = "0.4.54" +version = "0.4.55" authors = { workspace = true } edition = { workspace = true } documentation = { workspace = true } diff --git a/mithril-test-lab/mithril-end-to-end/src/devnet/runner.rs b/mithril-test-lab/mithril-end-to-end/src/devnet/runner.rs index c2312b9b156..f785eec74d6 100644 --- a/mithril-test-lab/mithril-end-to-end/src/devnet/runner.rs +++ b/mithril-test-lab/mithril-end-to-end/src/devnet/runner.rs @@ -119,17 +119,22 @@ impl Devnet { info!("Bootstrapping the Devnet"; "script" => &bootstrap_script_path.display()); - bootstrap_command + let exit_status = bootstrap_command .spawn() .with_context(|| format!("{bootstrap_script} failed to start"))? .wait() .await .with_context(|| format!("{bootstrap_script} failed to run"))?; - - Ok(Devnet { - artifacts_dir: bootstrap_args.artifacts_target_dir.to_owned(), - number_of_pool_nodes: bootstrap_args.number_of_pool_nodes, - }) + match exit_status.code() { + Some(0) => Ok(Devnet { + artifacts_dir: bootstrap_args.artifacts_target_dir.to_owned(), + number_of_pool_nodes: bootstrap_args.number_of_pool_nodes, + }), + Some(code) => Err(anyhow!(RetryableDevnetError(format!( + "Bootstrap devnet exited with status code: {code}" + )))), + None => Err(anyhow!("Bootstrap devnet terminated by signal")), + } } /// Factory for test purposes