forked from OSchip/llvm-project
[CMake] Override debugserver to use the build tree on Darwin
This patch adds support to the test suite for overriding the path to debugserver, and uses the override to point to the build tree's debugserver on Darwin. llvm-svn: 297776
This commit is contained in:
parent
32f6b5129f
commit
265ca535ab
|
@ -364,6 +364,9 @@ def parseOptionsAndInitTestdirs():
|
|||
|
||||
if args.executable:
|
||||
lldbtest_config.lldbExec = os.path.realpath(args.executable)
|
||||
|
||||
if args.server:
|
||||
os.environ['LLDB_DEBUGSERVER_PATH'] = args.server
|
||||
|
||||
if args.excluded:
|
||||
for excl_file in args.excluded:
|
||||
|
|
|
@ -123,6 +123,10 @@ def create_parser():
|
|||
'--executable',
|
||||
metavar='executable-path',
|
||||
help='The path to the lldb executable')
|
||||
group.add_argument(
|
||||
'--server',
|
||||
metavar='server-path',
|
||||
help='The path to the debug server executable to use')
|
||||
group.add_argument(
|
||||
'-s',
|
||||
metavar='name',
|
||||
|
|
|
@ -97,6 +97,10 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows|Darwin")
|
|||
--env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY})
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_APPLE)
|
||||
list(APPEND LLDB_TEST_COMMON_ARGS --server $<TARGET_FILE:debugserver>)
|
||||
endif()
|
||||
|
||||
add_python_test_target(check-lldb-single
|
||||
${LLDB_SOURCE_DIR}/test/dotest.py
|
||||
"--no-multiprocess;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
|
||||
|
@ -112,3 +116,8 @@ add_python_test_target(check-lldb
|
|||
"${LLDB_DOTEST_ARGS}"
|
||||
"Testing LLDB (parallel execution, with a separate subprocess per test)"
|
||||
)
|
||||
|
||||
add_custom_target(lldb-test-depends DEPENDS ${LLDB_TEST_DEPENDS})
|
||||
# This will add LLDB's test dependencies to the depenednecies for check-all and
|
||||
# include them in the test-depends target.
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS})
|
||||
|
|
Loading…
Reference in New Issue