3ca7b2d03c
This reapplies 7df4eaaa93/D96202, which was reverted due to issues on windows. These were caused by problems in the computation of the liblldb directory, which was fixed by D96779. The original commit message was: Our test configuration logic assumes that the tests can be run either with debugserver or with lldb-server. This is not entirely correct, since lldb server has two "personalities" (platform server and debug server) and debugserver is only a replacement for the latter. A consequence of this is that it's not possible to test the platform behavior of lldb-server on macos, as it is not possible to get a hold of the lldb-server binary. One solution to that would be to duplicate the server configuration logic to be able to specify both executables. However, that seems excessively redundant. A well-behaved lldb should be able to find the debug server on its own, and testing lldb with a different (lldb-|debug)server does not seem very useful (even in the out-of-tree debugserver setup, we copy the server into the build tree to make it appear "real"). Therefore, this patch deletes the configuration altogether and changes the low-level server retrieval functions to be able to both lldb-server and debugserver paths. They do this by consulting the "support executable" directory of the lldb under test. Differential Revision: https://reviews.llvm.org/D96202
38 lines
1.4 KiB
Plaintext
Executable file
38 lines
1.4 KiB
Plaintext
Executable file
#!@Python3_EXECUTABLE@
|
|
import subprocess
|
|
import sys
|
|
|
|
dotest_path = '@LLDB_SOURCE_DIR_CONFIGURED@/test/API/dotest.py'
|
|
dotest_args_str = '@LLDB_DOTEST_ARGS_CONFIGURED@'
|
|
arch = '@LLDB_TEST_ARCH@'
|
|
executable = '@LLDB_TEST_EXECUTABLE_CONFIGURED@'
|
|
compiler = '@LLDB_TEST_COMPILER_CONFIGURED@'
|
|
dsymutil = '@LLDB_TEST_DSYMUTIL_CONFIGURED@'
|
|
lldb_build_dir = '@LLDB_TEST_BUILD_DIRECTORY_CONFIGURED@'
|
|
lldb_build_intel_pt = "@LLDB_BUILD_INTEL_PT@"
|
|
lldb_framework_dir = "@LLDB_FRAMEWORK_DIR_CONFIGURED@"
|
|
lldb_libs_dir = "@LLDB_LIBS_DIR_CONFIGURED@"
|
|
llvm_tools_dir = "@LLVM_TOOLS_DIR_CONFIGURED@"
|
|
|
|
if __name__ == '__main__':
|
|
wrapper_args = sys.argv[1:]
|
|
dotest_args = dotest_args_str.split(';')
|
|
# Build dotest.py command.
|
|
cmd = [sys.executable, dotest_path]
|
|
cmd.extend(['--arch', arch])
|
|
cmd.extend(dotest_args)
|
|
cmd.extend(['--build-dir', lldb_build_dir])
|
|
cmd.extend(['--executable', executable])
|
|
cmd.extend(['--compiler', compiler])
|
|
cmd.extend(['--dsymutil', dsymutil])
|
|
cmd.extend(['--lldb-libs-dir', lldb_libs_dir])
|
|
cmd.extend(['--llvm-tools-dir', llvm_tools_dir])
|
|
if lldb_framework_dir:
|
|
cmd.extend(['--framework', lldb_framework_dir])
|
|
if lldb_build_intel_pt == "1":
|
|
cmd.extend(['--enable-plugin', 'intel-pt'])
|
|
cmd.extend(wrapper_args)
|
|
# Invoke dotest.py and return exit code.
|
|
print(' '.join(cmd))
|
|
sys.exit(subprocess.call(cmd))
|