Skip to content

Commit

Permalink
compiletest: try running lldb_batchmode.py with PYTHONUNBUFFERED
Browse files Browse the repository at this point in the history
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 #78665.
  • Loading branch information
pietroalbini committed Nov 2, 2020
1 parent 3478d7c commit 0af9f7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/compiletest/src/runtest.rs
Expand Up @@ -1166,6 +1166,7 @@ impl<'test> TestCx<'test> {
.arg(&lldb_script_path)
.arg(test_executable)
.arg(debugger_script)
.env("PYTHONUNBUFFERED", "1") // Help debugging #78665
.env("PYTHONPATH", self.config.lldb_python_dir.as_ref().unwrap()),
)
}
Expand Down

0 comments on commit 0af9f7e

Please sign in to comment.