aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/decorators.py6
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest_args.py5
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py1
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest_config.py3
5 files changed, 18 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 3837937..72c2ed7 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -22,6 +22,7 @@ import use_lldb_suite
import lldb
from . import configuration
from . import test_categories
+from . import lldbtest_config
from lldbsuite.test_event.event_builder import EventBuilder
from lldbsuite.support import funcutils
from lldbsuite.test import lldbplatform
@@ -476,6 +477,11 @@ def expectedFlakeyAndroid(bugnumber=None, api_levels=None, archs=None):
archs),
bugnumber)
+def skipIfOutOfTreeDebugserver(func):
+ """Decorate the item to skip tests if using an out-of-tree debugserver."""
+ def is_out_of_tree_debugserver():
+ return "out-of-tree debugserver" if lldbtest_config.out_of_tree_debugserver else None
+ return skipTestIfFn(is_out_of_tree_debugserver)(func)
def skipIfRemote(func):
"""Decorate the item to skip tests if testing remotely."""
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 800a60e..41a15eb 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -307,6 +307,9 @@ def parseOptionsAndInitTestdirs():
if args.log_success:
lldbtest_config.log_success = args.log_success
+ if args.out_of_tree_debugserver:
+ lldbtest_config.out_of_tree_debugserver = args.out_of_tree_debugserver
+
# Set SDKROOT if we are using an Apple SDK
if platform_system == 'Darwin' and args.apple_sdk:
os.environ['SDKROOT'] = seven.get_command_output(
diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index c6e4a4b..1f3eca3 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -127,6 +127,11 @@ def create_parser():
metavar='server-path',
help='The path to the debug server executable to use')
group.add_argument(
+ '--out-of-tree-debugserver',
+ dest='out_of_tree_debugserver',
+ action='store_true',
+ help='A flag to indicate an out-of-tree debug server is being used')
+ group.add_argument(
'-s',
metavar='name',
help='Specify the name of the dir created to store the session files of tests with errored or failed status. If not specified, the test driver uses the timestamp as the session dir name')
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py b/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
index f82443f..b28e8c7 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
@@ -69,6 +69,7 @@ class RegisterCommandsTestCase(TestBase):
@expectedFailureAndroid(archs=["i386"])
@skipIfFreeBSD # llvm.org/pr25057
@skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
+ @skipIfOutOfTreeDebugserver
def test_fp_special_purpose_register_read(self):
"""Test commands that read fpu special purpose registers."""
self.build()
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest_config.py b/lldb/packages/Python/lldbsuite/test/lldbtest_config.py
index 2e8e302..30546af 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest_config.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest_config.py
@@ -16,5 +16,8 @@ channels = []
# leave logs/traces even for successful test runs
log_success = False
+# Indicate whether we're testing with an out-of-tree debugserver
+out_of_tree_debugserver = False
+
# path to the lldb command line executable tool
lldbExec = None