From 0af9f7edb74639b9cf0eed8bd1d2e5b80880fd9a Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 2 Nov 2020 13:20:16 +0100 Subject: [PATCH] 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 #78665. --- src/tools/compiletest/src/runtest.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 666e5d402ef..492620d45bf 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -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()), ) } -- 2.44.0