[Lldb-commits] [lldb] 4d0e07f - [lldb] Make Asan/SIP workaround work for Python 3
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 8 09:20:47 PST 2019
Author: Jonas Devlieghere
Date: 2019-11-08T09:19:56-08:00
New Revision: 4d0e07f7862b832fb49a466feb8046770ea5b792
URL: https://github.com/llvm/llvm-project/commit/4d0e07f7862b832fb49a466feb8046770ea5b792
DIFF: https://github.com/llvm/llvm-project/commit/4d0e07f7862b832fb49a466feb8046770ea5b792.diff
LOG: [lldb] Make Asan/SIP workaround work for Python 3
Make the check generic instead of hard-coding the path to Python 2. This
also fixes the print-syntax to be compatible with both versions.
Added:
Modified:
lldb/test/API/lldbtest.py
Removed:
################################################################################
diff --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py
index a12544c7cbc6..e7ba5eb3b04d 100644
--- a/lldb/test/API/lldbtest.py
+++ b/lldb/test/API/lldbtest.py
@@ -79,8 +79,10 @@ def execute(self, test, litConfig):
if not os.path.isfile(copied_python):
import shutil, subprocess
python = subprocess.check_output([
- '/usr/bin/python2.7', '-c',
- 'import sys; print sys.executable']).strip()
+ sys.executable,
+ '-c',
+ 'import sys; print(sys.executable)'
+ ]).decode('utf-8').strip()
shutil.copy(python, copied_python)
cmd[0] = copied_python
More information about the lldb-commits
mailing list