llvm-project/lldb/use_lldb_suite_root.py
Jordan Rupprecht 0e5c28d193
[lldb][test] Remove LLDB_TEST_USE_VENDOR_PACKAGES (#89260)
The `LLDB_TEST_USE_VENDOR_PACKAGES` has defaulted to `Off` for a while.
Either installing `pexpect` or skipping those tests with
`-DLLDB_TEST_USER_ARGS=--skip-category=pexpect` seems to be enough that
we can fully remove this option.

This patch removes the `LLDB_TEST_USE_VENDOR_PACKAGES` cmake
configuration as well as the associated code to add
`third_party/Python/module` to the python path. I'll do the actual
deletion of `third_party/Python/module` in a followup PR in the
(unlikely, I hope) event this commit needs to be reverted.
2024-04-18 13:17:39 -05:00

14 lines
293 B
Python

import inspect
import os
import sys
def add_lldbsuite_packages_dir(lldb_root):
packages_dir = os.path.join(lldb_root, "packages", "Python")
sys.path.insert(0, packages_dir)
lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
add_lldbsuite_packages_dir(lldb_root)