summaryrefslogtreecommitdiffstats
path: root/lldb/test/API
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-11-08 09:19:54 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2019-11-08 09:19:56 -0800
commit4d0e07f7862b832fb49a466feb8046770ea5b792 (patch)
tree66ff92889a7872ac42f153d8d8ea02bd45e4c921 /lldb/test/API
parent6b44a41fefc7a62a5024c64fb7453f5ee93f3bb6 (diff)
downloadbcm5719-llvm-4d0e07f7862b832fb49a466feb8046770ea5b792.tar.gz
bcm5719-llvm-4d0e07f7862b832fb49a466feb8046770ea5b792.zip
[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.
Diffstat (limited to 'lldb/test/API')
-rw-r--r--lldb/test/API/lldbtest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py
index a12544c7cbc..e7ba5eb3b04 100644
--- a/lldb/test/API/lldbtest.py
+++ b/lldb/test/API/lldbtest.py
@@ -79,8 +79,10 @@ class LLDBTest(TestFormat):
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
OpenPOWER on IntegriCloud