Debug failing integration tests

This commit is contained in:
Felix Schütt
2022-12-29 10:21:58 +01:00
parent 994ea4574d
commit f7df7cc28d
2 changed files with 11 additions and 3 deletions

View File

@@ -1122,10 +1122,10 @@ fn link_exe_from_dir(
cmd.args(files_winsdk); cmd.args(files_winsdk);
} }
if debug {
println!("{cmd:?}"); println!("{cmd:?}");
}
let compilation = cmd let compilation = cmd
.stdout(std::process::Stdio::inherit())
.output() .output()
.context(anyhow!("Could not execute `zig`: {cmd:?}"))?; .context(anyhow!("Could not execute `zig`: {cmd:?}"))?;
@@ -1139,6 +1139,12 @@ fn link_exe_from_dir(
// remove file if it exists - if not done, can lead to errors on copy // remove file if it exists - if not done, can lead to errors on copy
let _ = std::fs::remove_file(&output_path); let _ = std::fs::remove_file(&output_path);
std::fs::copy(&out_path, &output_path).map_err(|e| { std::fs::copy(&out_path, &output_path).map_err(|e| {
std::process::Command::new("ls")
.arg(out_path.parent().unwrap())
.stdout(std::process::Stdio::inherit())
.stderr(std::process::Stdio::inherit())
.output()
.unwrap();
anyhow::anyhow!( anyhow::anyhow!(
"could not copy from {} to {}: {e}", "could not copy from {} to {}: {e}",
out_path.display(), out_path.display(),

View File

@@ -63,6 +63,8 @@ fn test_cross_compile_python_windows() -> anyhow::Result<()> {
output.arg(wasi_test_python_path()); output.arg(wasi_test_python_path());
output.arg("--target"); output.arg("--target");
output.arg(t); output.arg(t);
output.arg("--debug-dir");
output.arg(&format!("./{t}-{c}"));
output.arg("-o"); output.arg("-o");
output.arg(python_wasmer_path.clone()); output.arg(python_wasmer_path.clone());
output.arg(format!("--{c}")); output.arg(format!("--{c}"));