[Lldb-commits] [lldb] [lldb][test] Add `pexpect` category for tests that `import pexpect` (PR #84860)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 12 08:54:26 PDT 2024


================
@@ -914,6 +914,25 @@ def checkForkVForkSupport():
         configuration.skip_categories.append("fork")
 
 
+def checkPexpectSupport():
+    from lldbsuite.test import lldbplatformutil
+
+    platform = lldbplatformutil.getPlatform()
+
+    # llvm.org/pr22274: need a pexpect replacement for windows
+    if platform in ["windows"]:
+        if configuration.verbose:
+            print("pexpect tests will be skipped because of unsupported platform")
+        configuration.skip_categories.append("pexpect")
+    elif not configuration.shouldSkipBecauseOfCategories(["pexpect"]):
+        try:
+            import pexpect
+        except:
+            print(
+                "Warning: pexpect is not installed, but pexpect tests are not being skipped."
----------------
DavidSpickett wrote:

I understand now.

Yeah adding something actionable would be a good improvement, tell them to install pexpect or to skip the category.

https://github.com/llvm/llvm-project/pull/84860


More information about the lldb-commits mailing list