-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb][test] Enforce pexpect
system availability by default
#84270
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
Conversation
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.
@llvm/pr-subscribers-lldb Author: Jordan Rupprecht (rupprecht) ChangesThis switches the default of If this breaks anything, the preferred fix is to install Full diff: https://github.com/llvm/llvm-project/pull/84270.diff 2 Files Affected:
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 93c8ffe4b7d8a0..5d62213c3f5838 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -68,7 +68,7 @@ option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb."
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." ON)
+ "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
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 950643a5b8cc8e..0ef2eb1c42ce06 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -34,7 +34,9 @@ endif()
# The "pexpect" package should come from the system environment, not from the
# LLDB tree. However, we delay the deletion of it from the tree in case
# users/buildbots don't have the package yet and need some time to install it.
-if (NOT LLDB_TEST_USE_VENDOR_PACKAGES)
+# Windows is configured to skip all pexpect tests, and guards all
+# "import pexpect" calls, so we do not need pexpect installed there.
+if (NOT LLDB_TEST_USE_VENDOR_PACKAGES AND NOT WIN32)
unset(PY_pexpect_FOUND CACHE)
lldb_find_python_module(pexpect)
if (NOT PY_pexpect_FOUND)
|
btw, it would be nice if LLDB buildbots were clean before landing this. https://green.lab.llvm.org/green/view/LLDB/ is currently giving me ERR_CONNECTION_REFUSED. The others are failing but I'm hoping ec72909 restores that. |
Yeah, unfortunately I don't have an ETA for when this will be back online. It's probably not worth waiting on that. Changing the configuration of these bots is almost instant, so if they come back and it turns out this did cause an issue, I (or our build wrangler) can easily turn it back off just for green dragon while we investigate. |
Chiming in on behalf of Fuchsia, since this did break us. We build and ship a custom Python with our LLDB, since we're intended to be a portable (i.e., drop it in a directory) distribution. That Python probably wouldn't have |
@mysterymath do you run the API test suites with that custom python, i.e. The goal is to be able to delete https://github.com/llvm/llvm-project/tree/main/lldb/third_party/Python/module/pexpect-4.6. This library is only used in the API tests. The goal of the cmake check here is to be able to have an ~immediate feedback loop that |
We do run the tests with the Python we ship, since we don't have direct control of the version that is present on our builders, and Python doesn't have ABI compatibility sufficient for LLDB's purposes across minor versions. We've generally tried to keep our builds hermetic and not build anything against host libraries unless absolutely necessary. We could possibly add |
This switches the default of
LLDB_TEST_USE_VENDOR_PACKAGES
fromON
toOFF
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 untilpexpect
can be installed. If neither of those work, reverting this patch is OK.