diff options
author | Pavel Labath <pavel@labath.sk> | 2024-05-24 08:52:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-24 08:52:32 +0200 |
commit | fa6377119c0624773cb698935692d46843e9f6ec (patch) | |
tree | a9876f37c71a7f40a9ed2fec5cc4bf5d1cc9d8cc /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | 5a48223d1c3457a61b4830537c82972c17fe607e (diff) | |
download | llvm-fa6377119c0624773cb698935692d46843e9f6ec.zip llvm-fa6377119c0624773cb698935692d46843e9f6ec.tar.gz llvm-fa6377119c0624773cb698935692d46843e9f6ec.tar.bz2 |
[lldb-dap] Automatically skip lldb-dap tests for remote platforms (#93169)
The don't currently work (and they're also not particularly useful,
since all of the remote stuff happens inside lldb).
This saves us from annotating tests one by one.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index ebabf34..2e537e3 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -542,12 +542,6 @@ def setupSysPath(): lldbDAPExec = os.path.join(lldbDir, "lldb-dap") if is_exe(lldbDAPExec): os.environ["LLDBDAP_EXEC"] = lldbDAPExec - else: - if not configuration.shouldSkipBecauseOfCategories(["lldb-dap"]): - print( - "The 'lldb-dap' executable cannot be located. The lldb-dap tests can not be run as a result." - ) - configuration.skip_categories.append("lldb-dap") lldbPythonDir = None # The directory that contains 'lldb/__init__.py' @@ -929,6 +923,24 @@ def checkPexpectSupport(): configuration.skip_categories.append("pexpect") +def checkDAPSupport(): + import lldb + + if "LLDBDAP_EXEC" not in os.environ: + msg = ( + "The 'lldb-dap' executable cannot be located and its tests will not be run." + ) + elif lldb.remote_platform: + msg = "lldb-dap tests are not compatible with remote platforms and will not be run." + else: + msg = None + + if msg: + if configuration.verbose: + print(msg) + configuration.skip_categories.append("lldb-dap") + + def run_suite(): # On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults # does not exist before proceeding to running the test suite. @@ -1029,6 +1041,7 @@ def run_suite(): checkObjcSupport() checkForkVForkSupport() checkPexpectSupport() + checkDAPSupport() skipped_categories_list = ", ".join(configuration.skip_categories) print( |