diff options
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( |