aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2020-11-05 21:24:56 +0100
committerMichał Górny <mgorny@moritz.systems>2020-11-06 14:34:12 +0100
commit1a8d52820f8e55f66567011e0ed852794b7f687d (patch)
tree30a3fc656ea28e13c0b3d9471deec1cdb83dda9d /lldb/packages/Python/lldbsuite/test/dotest.py
parentadc69743d2ca1ed7a3c8be6ac7b67f77ce75bdef (diff)
downloadllvm-1a8d52820f8e55f66567011e0ed852794b7f687d.zip
llvm-1a8d52820f8e55f66567011e0ed852794b7f687d.tar.gz
llvm-1a8d52820f8e55f66567011e0ed852794b7f687d.tar.bz2
[lldb] [test] Avoid double negation in llgs/debugserver logic
Use positive logic (i.e. llgs_platform/debugserver_platform) for indicating which platforms use the particular server variant. Deduplicate the lists — it is rather expected that none of the platforms using LLGS would use debugserver. Differential Revision: https://reviews.llvm.org/D90875
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 420c52a..5a81011 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -938,26 +938,20 @@ def run_suite():
# Note that it's not dotest's job to clean this directory.
lldbutil.mkdir_p(configuration.test_build_dir)
- target_platform = lldb.selected_platform.GetTriple().split('-')[2]
+ from . import lldbplatformutil
+ target_platform = lldbplatformutil.getPlatform()
checkLibcxxSupport()
checkLibstdcxxSupport()
checkWatchpointSupport()
checkDebugInfoSupport()
- # Don't do debugserver tests on anything except OS X.
- configuration.dont_do_debugserver_test = (
- "linux" in target_platform or
- "freebsd" in target_platform or
- "netbsd" in target_platform or
- "windows" in target_platform)
-
- # Don't do lldb-server (llgs) tests on platforms not supporting it.
- configuration.dont_do_llgs_test = not (
- "freebsd" in target_platform or
- "linux" in target_platform or
- "netbsd" in target_platform or
- "windows" in target_platform)
+ # Perform LLGS tests only on platforms using it.
+ configuration.llgs_platform = (
+ target_platform in ["freebsd", "linux", "netbsd", "windows"])
+
+ # Perform debugserver tests elsewhere (i.e. on Darwin platforms).
+ configuration.debugserver_platform = not configuration.llgs_platform
for testdir in configuration.testdirs:
for (dirpath, dirnames, filenames) in os.walk(testdir):