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
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."""
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(
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')
@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()
# 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
list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH})
endif()
+if(SKIP_DEBUGSERVER)
+ list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver)
+endif()
+
set(LLDB_DOTEST_ARGS ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS})
add_python_test_target(check-lldb-single