Author: cbieneman Date: Tue Mar 14 15:04:46 2017 New Revision: 297776 URL: http://llvm.org/viewvc/llvm-project?rev=297776&view=rev Log: [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. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py lldb/trunk/test/CMakeLists.txt Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=297776&r1=297775&r2=297776&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Mar 14 15:04:46 2017 @@ -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: Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=297776&r1=297775&r2=297776&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Mar 14 15:04:46 2017 @@ -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') Modified: lldb/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=297776&r1=297775&r2=297776&view=diff ============================================================================== --- lldb/trunk/test/CMakeLists.txt (original) +++ lldb/trunk/test/CMakeLists.txt Tue Mar 14 15:04:46 2017 @@ -97,6 +97,10 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Wi --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}) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits