diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-08 09:19:54 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-08 09:19:56 -0800 |
| commit | 4d0e07f7862b832fb49a466feb8046770ea5b792 (patch) | |
| tree | 66ff92889a7872ac42f153d8d8ea02bd45e4c921 /lldb/test/API | |
| parent | 6b44a41fefc7a62a5024c64fb7453f5ee93f3bb6 (diff) | |
| download | bcm5719-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.py | 6 |
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 |

