Skip to content

Commit 0af9f7e

Browse files
committed
compiletest: try running lldb_batchmode.py with PYTHONUNBUFFERED
When reporting fatal errors, LLVM calls abort() to exit the program. There is a chance that might interfere with Python printing stuff to stdout, as by default it relies on buffering to increase performance. This commit tries to disable Python buffering, to hopefully get useful logs while debugging rust-lang#78665.
1 parent 3478d7c commit 0af9f7e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tools/compiletest/src/runtest.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,7 @@ impl<'test> TestCx<'test> {
11661166
.arg(&lldb_script_path)
11671167
.arg(test_executable)
11681168
.arg(debugger_script)
1169+
.env("PYTHONUNBUFFERED", "1") // Help debugging #78665
11691170
.env("PYTHONPATH", self.config.lldb_python_dir.as_ref().unwrap()),
11701171
)
11711172
}

0 commit comments

Comments
 (0)