diff options
author | Chris Bieneman <beanz@apple.com> | 2017-03-14 20:04:46 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2017-03-14 20:04:46 +0000 |
commit | 265ca535ab1c208749c05fbbb2d18ddd0047dd65 (patch) | |
tree | cff3ad25dc01a4f7fa9b0ee686860700ba6ad758 | |
parent | 32f6b5129f21d7e0e0e654d143a02b56509e74ea (diff) | |
download | bcm5719-llvm-265ca535ab1c208749c05fbbb2d18ddd0047dd65.tar.gz bcm5719-llvm-265ca535ab1c208749c05fbbb2d18ddd0047dd65.zip |
[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
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 3 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest_args.py | 4 | ||||
-rw-r--r-- | lldb/test/CMakeLists.txt | 9 |
3 files changed, 16 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 6b6b2574e63..122c51432fc 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -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: diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index fc896d53c0b..29150562d6d 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -124,6 +124,10 @@ def create_parser(): 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', 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/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index c0e77a646e6..0cb744760a5 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -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}) |