Skip to content

Commit 7b2b0f2

Browse files
committed
Add path context to test run failure
This was very opaque in the error message in CI
1 parent 51a5e29 commit 7b2b0f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/validation.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,12 +2097,13 @@ fn verify_distribution_behavior(dist_path: &Path) -> Result<Vec<String>> {
20972097
std::fs::write(&test_file, PYTHON_VERIFICATIONS.as_bytes())?;
20982098

20992099
eprintln!(" running interpreter tests (output should follow)");
2100-
let output = duct::cmd(python_exe, [test_file.display().to_string()])
2100+
let output = duct::cmd(&python_exe, [test_file.display().to_string()])
21012101
.stdout_to_stderr()
21022102
.unchecked()
21032103
.env("TARGET_TRIPLE", &python_json.target_triple)
21042104
.env("BUILD_OPTIONS", &python_json.build_options)
2105-
.run()?;
2105+
.run()
2106+
.context(format!("Failed to run `{} {}`", python_exe.display(), test_file.display()))?;
21062107

21072108
if !output.status.success() {
21082109
errors.push("errors running interpreter tests".to_string());

0 commit comments

Comments
 (0)