[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / lldb / utils / lldb-dotest / lldb-dotest.in
blobf6b5e0d01dcfa4f68f52c5bf69b4bbad0b9df30b
1 #!@Python3_EXECUTABLE@
2 import subprocess
3 import sys
5 dotest_path = '@LLDB_SOURCE_DIR_CONFIGURED@/test/API/dotest.py'
6 dotest_args_str = '@LLDB_DOTEST_ARGS_CONFIGURED@'
7 arch = '@LLDB_TEST_ARCH@'
8 executable = '@LLDB_TEST_EXECUTABLE_CONFIGURED@'
9 compiler = '@LLDB_TEST_COMPILER_CONFIGURED@'
10 dsymutil = '@LLDB_TEST_DSYMUTIL_CONFIGURED@'
11 lldb_build_dir = '@LLDB_TEST_BUILD_DIRECTORY_CONFIGURED@'
12 lldb_build_intel_pt = "@LLDB_BUILD_INTEL_PT@"
13 lldb_framework_dir = "@LLDB_FRAMEWORK_DIR_CONFIGURED@"
14 lldb_libs_dir = "@LLDB_LIBS_DIR_CONFIGURED@"
15 llvm_tools_dir = "@LLVM_TOOLS_DIR_CONFIGURED@"
17 if __name__ == '__main__':
18     wrapper_args = sys.argv[1:]
19     dotest_args = dotest_args_str.split(';')
20     # Build dotest.py command.
21     cmd = [sys.executable, dotest_path]
22     cmd.extend(['--arch', arch])
23     cmd.extend(dotest_args)
24     cmd.extend(['--build-dir', lldb_build_dir])
25     cmd.extend(['--executable', executable])
26     cmd.extend(['--compiler', compiler])
27     cmd.extend(['--dsymutil', dsymutil])
28     cmd.extend(['--lldb-libs-dir', lldb_libs_dir])
29     cmd.extend(['--llvm-tools-dir', llvm_tools_dir])
30     if lldb_framework_dir:
31         cmd.extend(['--framework', lldb_framework_dir])
32     if lldb_build_intel_pt == "1":
33         cmd.extend(['--enable-plugin', 'intel-pt'])
34     cmd.extend(wrapper_args)
35     # Invoke dotest.py and return exit code.
36     print(' '.join(cmd))
37     sys.exit(subprocess.call(cmd))