Skip to content

Commit 0e5c28d

Browse files
authored
[lldb][test] Remove LLDB_TEST_USE_VENDOR_PACKAGES (llvm#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.
1 parent c577f91 commit 0e5c28d

File tree

10 files changed

+1
-37
lines changed

10 files changed

+1
-37
lines changed

clang/cmake/caches/Fuchsia.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH
6565
LLDB_EMBED_PYTHON_HOME
6666
LLDB_PYTHON_HOME
6767
LLDB_PYTHON_RELATIVE_PATH
68-
LLDB_TEST_USE_VENDOR_PACKAGES
6968
LLDB_TEST_USER_ARGS
7069
Python3_EXECUTABLE
7170
Python3_LIBRARIES

lldb/cmake/modules/LLDBConfig.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing ll
6767
option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb." OFF)
6868
option(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS
6969
"Fail to configure if certain requirements are not met for testing." OFF)
70-
option(LLDB_TEST_USE_VENDOR_PACKAGES
71-
"Use packages from lldb/third_party/Python/module instead of system deps." OFF)
7270

7371
set(LLDB_GLOBAL_INIT_DIRECTORY "" CACHE STRING
7472
"Path to the global lldbinit directory. Relative paths are resolved relative to the

lldb/packages/Python/lldbsuite/test/lldb_pylint_helper.py

-8
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,6 @@ def child_dirs(parent_dir):
157157
0, os.path.join(packages_python_child_dir, "test_runner", "lib")
158158
)
159159

160-
# Handle third_party module/package directory.
161-
third_party_module_dir = os.path.join(
162-
check_dir, "third_party", "Python", "module"
163-
)
164-
for child_dir in child_dirs(third_party_module_dir):
165-
# Yes, we embed the module in the module parent dir
166-
sys.path.insert(0, child_dir)
167-
168160
# We're done.
169161
break
170162

lldb/test/API/lit.cfg.py

-3
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,3 @@ def delete_module_cache(path):
310310
# Propagate XDG_CACHE_HOME
311311
if "XDG_CACHE_HOME" in os.environ:
312312
config.environment["XDG_CACHE_HOME"] = os.environ["XDG_CACHE_HOME"]
313-
314-
if is_configured("use_vendor_packages"):
315-
config.environment["LLDB_TEST_USE_VENDOR_PACKAGES"] = "1"

lldb/test/API/lit.site.cfg.py.in

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ config.libcxx_include_target_dir = "@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@"
3838
# The API tests use their own module caches.
3939
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api")
4040
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api")
41-
config.use_vendor_packages = @LLDB_TEST_USE_VENDOR_PACKAGES@
4241

4342
# Plugins
4443
lldb_build_intel_pt = '@LLDB_BUILD_INTEL_PT@'

lldb/test/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ llvm_canonicalize_cmake_booleans(
245245
LLDB_HAS_LIBCXX
246246
LLDB_TOOL_LLDB_SERVER_BUILD
247247
LLDB_USE_SYSTEM_DEBUGSERVER
248-
LLDB_IS_64_BITS
249-
LLDB_TEST_USE_VENDOR_PACKAGES)
248+
LLDB_IS_64_BITS)
250249

251250
# Configure the individual test suites.
252251
add_subdirectory(API)

lldb/use_lldb_suite_root.py

-14
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,11 @@
33
import sys
44

55

6-
def add_third_party_module_dirs(lldb_root):
7-
third_party_modules_dir = os.path.join(lldb_root, "third_party", "Python", "module")
8-
if not os.path.isdir(third_party_modules_dir):
9-
return
10-
11-
module_dirs = os.listdir(third_party_modules_dir)
12-
for module_dir in module_dirs:
13-
module_dir = os.path.join(third_party_modules_dir, module_dir)
14-
sys.path.insert(0, module_dir)
15-
16-
176
def add_lldbsuite_packages_dir(lldb_root):
187
packages_dir = os.path.join(lldb_root, "packages", "Python")
198
sys.path.insert(0, packages_dir)
209

2110

2211
lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
2312

24-
# Use environment variables to avoid plumbing flags, lit configs, etc.
25-
if os.getenv("LLDB_TEST_USE_VENDOR_PACKAGES"):
26-
add_third_party_module_dirs(lldb_root)
2713
add_lldbsuite_packages_dir(lldb_root)

lldb/utils/lldb-dotest/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ set(LLDB_LIBS_DIR "${LLVM_LIBRARY_OUTPUT_INTDIR}")
1010
llvm_canonicalize_cmake_booleans(
1111
LLDB_BUILD_INTEL_PT
1212
LLDB_HAS_LIBCXX
13-
LLDB_TEST_USE_VENDOR_PACKAGES
1413
)
1514

1615
if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)

lldb/utils/lldb-dotest/lldb-dotest.in

-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,8 @@ has_libcxx = @LLDB_HAS_LIBCXX@
1818
libcxx_libs_dir = "@LIBCXX_LIBRARY_DIR@"
1919
libcxx_include_dir = "@LIBCXX_GENERATED_INCLUDE_DIR@"
2020
libcxx_include_target_dir = "@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@"
21-
use_vendor_packages = @LLDB_TEST_USE_VENDOR_PACKAGES@
2221

2322
if __name__ == '__main__':
24-
if use_vendor_packages:
25-
os.putenv("LLDB_TEST_USE_VENDOR_PACKAGES", "1")
26-
2723
wrapper_args = sys.argv[1:]
2824
dotest_args = []
2925
# split on an empty string will produce [''] and if you

llvm/utils/gn/secondary/lldb/test/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ write_lit_cfg("lit_api_site_cfg") {
6161
"LLDB_TEST_USER_ARGS=",
6262
"LLDB_ENABLE_PYTHON=0",
6363
"LLDB_HAS_LIBCXX=False", # FIXME: support this (?)
64-
"LLDB_TEST_USE_VENDOR_PACKAGES=False",
6564
"LLDB_LIBS_DIR=", # FIXME: for shared builds only (?)
6665
"LLDB_TEST_ARCH=$current_cpu",
6766
"LLDB_TEST_COMPILER=" + rebase_path("$root_build_dir/bin/clang"),

0 commit comments

Comments
 (0)