Skip to content

Commit 3239b4d

Browse files
authored
[lldb][test] Enforce pexpect system availability by default (llvm#84270)
This switches the default of `LLDB_TEST_USE_VENDOR_PACKAGES` from `ON` to `OFF` in preparation for eventually deleting it. All known LLDB buildbots have this package installed, so flipping the default will uncover any other users. If this breaks anything, the preferred fix is to install `pexpect` on the host system. The second fix is to build with cmake option `-DLLDB_TEST_USE_VENDOR_PACKAGES=ON` as a temporary measure until `pexpect` can be installed. If neither of those work, reverting this patch is OK.
1 parent 2b8aaef commit 3239b4d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb."
6868
option(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS
6969
"Fail to configure if certain requirements are not met for testing." OFF)
7070
option(LLDB_TEST_USE_VENDOR_PACKAGES
71-
"Use packages from lldb/third_party/Python/module instead of system deps." ON)
71+
"Use packages from lldb/third_party/Python/module instead of system deps." OFF)
7272

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

lldb/test/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ endif()
3434
# The "pexpect" package should come from the system environment, not from the
3535
# LLDB tree. However, we delay the deletion of it from the tree in case
3636
# users/buildbots don't have the package yet and need some time to install it.
37-
if (NOT LLDB_TEST_USE_VENDOR_PACKAGES)
37+
# Windows is configured to skip all pexpect tests, and guards all
38+
# "import pexpect" calls, so we do not need pexpect installed there.
39+
if (NOT LLDB_TEST_USE_VENDOR_PACKAGES AND NOT WIN32)
3840
unset(PY_pexpect_FOUND CACHE)
3941
lldb_find_python_module(pexpect)
4042
if (NOT PY_pexpect_FOUND)

0 commit comments

Comments
 (0)