builder: retain Cargo config for run and correct acceptance checks

This commit is contained in:
2026-11-07 14:20:37 +00:00
parent e53211eff1
commit 7ee4059414
3 changed files with 19 additions and 13 deletions
+7 -5
View File
@@ -171,7 +171,8 @@ async fn cargo_build_test_and_source_changes() -> anyhow::Result<()> {
.await?;
assert_eq!(code, 0, "{out}");
assert!(out.contains("INTEGRATION_CASE"), "{out}");
let (code, out) = cargo(&runtime, &["test", "fail"]).await?;
// WASI aborts on panic, so disable capture to expose the panic message.
let (code, out) = cargo(&runtime, &["test", "fail", "--", "--nocapture"]).await?;
assert_eq!(code, 101, "{out}");
assert!(out.contains("intentional fixture failure"), "{out}");
let (code, out) = cargo(&runtime, &["test", "--no-run"]).await?;
@@ -291,7 +292,7 @@ async fn timeout_and_cancellation() -> anyhow::Result<()> {
std::fs::create_dir_all(&bin)?;
std::fs::copy(binaries.join("cargo.wasm"), bin.join("cargo.wasm"))?;
let runtime = Runtime::new(world)?;
let code = runtime
let error = runtime
.exec(
Command::Argv(vec!["/bin/cargo.wasm".into(), "build".into()]),
Options {
@@ -301,10 +302,11 @@ async fn timeout_and_cancellation() -> anyhow::Result<()> {
},
&mut |_, _| {},
)
.await?;
assert_ne!(code, 0);
.await
.unwrap_err();
assert!(error.to_string().contains("timed out"), "{error}");
let (code, out) =
tokio::time::timeout(Duration::from_secs(5), cargo(&runtime, &["metadata"])).await??;
tokio::time::timeout(Duration::from_secs(20), cargo(&runtime, &["metadata"])).await??;
assert_eq!(
code, 0,
"the canceled build still held the builder lock: {out}"