[Lldb-commits] [lldb] [lldb] make lit use the same Python executable for building and testing (PR #143756)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 11 12:02:05 PDT 2025
https://github.com/charles-zablit updated https://github.com/llvm/llvm-project/pull/143756
>From 0a4aee29aedd9079d03750c0757f4a2e93da5933 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Wed, 11 Jun 2025 18:43:13 +0100
Subject: [PATCH 1/2] [lldb] make lit use the same Python executable for
building and testing
---
lldb/test/Shell/lit.cfg.py | 3 +++
lldb/test/Unit/lit.cfg.py | 3 +++
2 files changed, 6 insertions(+)
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index ab6113767187a..a48d43251c988 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -203,3 +203,6 @@ def calculate_arch_features(arch_string):
# location of the Python libraries. This ensures that we use the same
# version of Python that was used to build lldb to run our tests.
config.environment["PYTHONHOME"] = config.python_root_dir
+config.environment["PATH"] = os.path.pathsep.join(
+ config.python_root_dir, config.environment.get("PATH", "")
+)
diff --git a/lldb/test/Unit/lit.cfg.py b/lldb/test/Unit/lit.cfg.py
index 681e3b19dce34..38ab821e5ee16 100644
--- a/lldb/test/Unit/lit.cfg.py
+++ b/lldb/test/Unit/lit.cfg.py
@@ -34,6 +34,9 @@
)
llvm_config.with_environment("PATH", os.path.dirname(sys.executable), append_path=True)
config.environment["PYTHONHOME"] = config.python_root_dir
+config.environment["PATH"] = os.path.pathsep.join(
+ config.python_root_dir, config.environment.get("PATH", "")
+)
# Enable sanitizer runtime flags.
if config.llvm_use_sanitizer:
>From 585d6e2b1a765ab1539b5aaa820f2070bed14181 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Wed, 11 Jun 2025 20:01:52 +0100
Subject: [PATCH 2/2] fixup! [lldb] make lit use the same Python executable for
building and testing
---
lldb/test/Shell/lit.cfg.py | 2 +-
lldb/test/Unit/lit.cfg.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index a48d43251c988..8c9448b23c56b 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -204,5 +204,5 @@ def calculate_arch_features(arch_string):
# version of Python that was used to build lldb to run our tests.
config.environment["PYTHONHOME"] = config.python_root_dir
config.environment["PATH"] = os.path.pathsep.join(
- config.python_root_dir, config.environment.get("PATH", "")
+ (config.python_root_dir, config.environment.get("PATH", ""))
)
diff --git a/lldb/test/Unit/lit.cfg.py b/lldb/test/Unit/lit.cfg.py
index 38ab821e5ee16..75ed4c7186e44 100644
--- a/lldb/test/Unit/lit.cfg.py
+++ b/lldb/test/Unit/lit.cfg.py
@@ -35,7 +35,7 @@
llvm_config.with_environment("PATH", os.path.dirname(sys.executable), append_path=True)
config.environment["PYTHONHOME"] = config.python_root_dir
config.environment["PATH"] = os.path.pathsep.join(
- config.python_root_dir, config.environment.get("PATH", "")
+ (config.python_root_dir, config.environment.get("PATH", ""))
)
# Enable sanitizer runtime flags.
More information about the lldb-commits
mailing list