0
0
mirror of https://github.com/llvm/llvm-project.git synced 2025-04-21 18:46:51 +00:00

[lldb][test] Remove LLDB_TEST_USE_VENDOR_PACKAGES ()

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.
This commit is contained in:
Jordan Rupprecht 2024-04-18 13:17:39 -05:00 committed by GitHub
parent c577f91d26
commit 0e5c28d193
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 1 additions and 37 deletions
clang/cmake/caches
lldb
llvm/utils/gn/secondary/lldb/test

@ -65,7 +65,6 @@ set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH
LLDB_EMBED_PYTHON_HOME
LLDB_PYTHON_HOME
LLDB_PYTHON_RELATIVE_PATH
LLDB_TEST_USE_VENDOR_PACKAGES
LLDB_TEST_USER_ARGS
Python3_EXECUTABLE
Python3_LIBRARIES

@ -67,8 +67,6 @@ option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing ll
option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb." OFF)
option(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS
"Fail to configure if certain requirements are not met for testing." OFF)
option(LLDB_TEST_USE_VENDOR_PACKAGES
"Use packages from lldb/third_party/Python/module instead of system deps." OFF)
set(LLDB_GLOBAL_INIT_DIRECTORY "" CACHE STRING
"Path to the global lldbinit directory. Relative paths are resolved relative to the

@ -157,14 +157,6 @@ def add_lldb_test_package_paths(check_dir):
0, os.path.join(packages_python_child_dir, "test_runner", "lib")
)
# Handle third_party module/package directory.
third_party_module_dir = os.path.join(
check_dir, "third_party", "Python", "module"
)
for child_dir in child_dirs(third_party_module_dir):
# Yes, we embed the module in the module parent dir
sys.path.insert(0, child_dir)
# We're done.
break

@ -310,6 +310,3 @@ if "FREEBSD_LEGACY_PLUGIN" in os.environ:
# Propagate XDG_CACHE_HOME
if "XDG_CACHE_HOME" in os.environ:
config.environment["XDG_CACHE_HOME"] = os.environ["XDG_CACHE_HOME"]
if is_configured("use_vendor_packages"):
config.environment["LLDB_TEST_USE_VENDOR_PACKAGES"] = "1"

@ -38,7 +38,6 @@ config.libcxx_include_target_dir = "@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@"
# The API tests use their own module caches.
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api")
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api")
config.use_vendor_packages = @LLDB_TEST_USE_VENDOR_PACKAGES@
# Plugins
lldb_build_intel_pt = '@LLDB_BUILD_INTEL_PT@'

@ -245,8 +245,7 @@ llvm_canonicalize_cmake_booleans(
LLDB_HAS_LIBCXX
LLDB_TOOL_LLDB_SERVER_BUILD
LLDB_USE_SYSTEM_DEBUGSERVER
LLDB_IS_64_BITS
LLDB_TEST_USE_VENDOR_PACKAGES)
LLDB_IS_64_BITS)
# Configure the individual test suites.
add_subdirectory(API)

@ -3,17 +3,6 @@ import os
import sys
def add_third_party_module_dirs(lldb_root):
third_party_modules_dir = os.path.join(lldb_root, "third_party", "Python", "module")
if not os.path.isdir(third_party_modules_dir):
return
module_dirs = os.listdir(third_party_modules_dir)
for module_dir in module_dirs:
module_dir = os.path.join(third_party_modules_dir, module_dir)
sys.path.insert(0, module_dir)
def add_lldbsuite_packages_dir(lldb_root):
packages_dir = os.path.join(lldb_root, "packages", "Python")
sys.path.insert(0, packages_dir)
@ -21,7 +10,4 @@ def add_lldbsuite_packages_dir(lldb_root):
lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
# Use environment variables to avoid plumbing flags, lit configs, etc.
if os.getenv("LLDB_TEST_USE_VENDOR_PACKAGES"):
add_third_party_module_dirs(lldb_root)
add_lldbsuite_packages_dir(lldb_root)

@ -10,7 +10,6 @@ set(LLDB_LIBS_DIR "${LLVM_LIBRARY_OUTPUT_INTDIR}")
llvm_canonicalize_cmake_booleans(
LLDB_BUILD_INTEL_PT
LLDB_HAS_LIBCXX
LLDB_TEST_USE_VENDOR_PACKAGES
)
if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)

@ -18,12 +18,8 @@ has_libcxx = @LLDB_HAS_LIBCXX@
libcxx_libs_dir = "@LIBCXX_LIBRARY_DIR@"
libcxx_include_dir = "@LIBCXX_GENERATED_INCLUDE_DIR@"
libcxx_include_target_dir = "@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@"
use_vendor_packages = @LLDB_TEST_USE_VENDOR_PACKAGES@
if __name__ == '__main__':
if use_vendor_packages:
os.putenv("LLDB_TEST_USE_VENDOR_PACKAGES", "1")
wrapper_args = sys.argv[1:]
dotest_args = []
# split on an empty string will produce [''] and if you

@ -61,7 +61,6 @@ write_lit_cfg("lit_api_site_cfg") {
"LLDB_TEST_USER_ARGS=",
"LLDB_ENABLE_PYTHON=0",
"LLDB_HAS_LIBCXX=False", # FIXME: support this (?)
"LLDB_TEST_USE_VENDOR_PACKAGES=False",
"LLDB_LIBS_DIR=", # FIXME: for shared builds only (?)
"LLDB_TEST_ARCH=$current_cpu",
"LLDB_TEST_COMPILER=" + rebase_path("$root_build_dir/bin/clang"),