Skip to content

[lldb][test] Remove LLDB_TEST_USE_VENDOR_PACKAGES #89260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion clang/cmake/caches/Fuchsia.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions lldb/cmake/modules/LLDBConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions lldb/packages/Python/lldbsuite/test/lldb_pylint_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ def child_dirs(parent_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

Expand Down
3 changes: 0 additions & 3 deletions lldb/test/API/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,3 @@ def delete_module_cache(path):
# 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"
1 change: 0 additions & 1 deletion lldb/test/API/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@'
Expand Down
3 changes: 1 addition & 2 deletions lldb/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 0 additions & 14 deletions lldb/use_lldb_suite_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,11 @@
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)


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)
1 change: 0 additions & 1 deletion lldb/utils/lldb-dotest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions lldb/utils/lldb-dotest/lldb-dotest.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion llvm/utils/gn/secondary/lldb/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down