]> git.lizzy.rs Git - rust.git/commitdiff
compiletest: try running lldb_batchmode.py with PYTHONUNBUFFERED
authorPietro Albini <pietro@pietroalbini.org>
Mon, 2 Nov 2020 12:20:16 +0000 (13:20 +0100)
committerPietro Albini <pietro@pietroalbini.org>
Mon, 2 Nov 2020 12:20:16 +0000 (13:20 +0100)
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.

src/tools/compiletest/src/runtest.rs

index 666e5d402ef1efb279460d4c2965ab938d6ef75d..492620d45bfe5b6096bb5cf7df0dc19636b3dfd2 100644 (file)
@@ -1166,6 +1166,7 @@ fn run_lldb(
                 .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()),
         )
     }