File: lldb-dotest.in

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (56 lines) | stat: -rwxr-xr-x 2,288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!@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@'
swift_compiler = '@LLDB_SWIFTC@'
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@"
lldb_obj_root = "@LLDB_BINARY_DIR@"
has_libcxx = @LLDB_HAS_LIBCXX@
libcxx_libs_dir = "@LIBCXX_LIBRARY_DIR@"
libcxx_include_dir = "@LIBCXX_GENERATED_INCLUDE_DIR@"
libcxx_include_target_dir = "@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@"
swift_libs_dir = '@LLDB_SWIFT_LIBS@' 

if __name__ == '__main__':
    wrapper_args = sys.argv[1:]
    dotest_args = []
    # split on an empty string will produce [''] and if you
    # add that to the command, it will be treated as a directory...
    if len(dotest_args_str) > 0:
        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 swift_compiler:
        cmd.extend(['--swift-compiler', swift_compiler])
    if has_libcxx:
        cmd.extend(['--libcxx-include-dir', libcxx_include_dir])
        if libcxx_include_target_dir:
            cmd.extend(['--libcxx-include-target-dir', libcxx_include_target_dir])
        cmd.extend(['--libcxx-library-dir', libcxx_libs_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(['--lldb-obj-root', lldb_obj_root])
    cmd.extend(wrapper_args)
    # Invoke dotest.py and return exit code.
    print(' '.join(cmd))
    sys.exit(subprocess.call(cmd))