================
@@ -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."
----------------
JDevlieghere wrote:
So what would happens without this code? Wouldn't we try to import pexpect
anyway in the relevant test? In other words, do we even need this? It seems
that printing a warning for non-pexpect either adds noise to the already
verbose test output or will be invisible if the test passes.
If the error message is poor enough that we would want to print something more
actionable, could we do it from the `PExpectTest` base class?
https://github.com/llvm/llvm-project/pull/84860
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits