Skip to content

Commit 7ae73d3

Browse files
authored
Merge pull request #31803 from drexin/wip-fix-lldb-lookup
[5.2][test] Fix LLDB Python Path and re-enable linux-fatal-backtrace.swift
2 parents c59784d + 4294da3 commit 7ae73d3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/lit.cfg

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ def get_simulator_command(run_os, run_cpu, sdk_path):
126126
else:
127127
lit_config.fatal("Unknown simulator OS %r" % run_os)
128128

129+
def get_lldb_python_path(lldb_build_root):
130+
lldb_path = os.path.join(lldb_build_root, 'bin', 'lldb')
131+
return subprocess.check_output([lldb_path, "-P"]).rstrip()
132+
129133
assert darwin_sdk_build_version_cmp("11A1", "12A1") < 0
130134
assert darwin_sdk_build_version_cmp("12A1", "11A1") > 0
131135

@@ -1675,10 +1679,8 @@ config.substitutions.append(('%import-libdispatch', getattr(config, 'import_libd
16751679

16761680
if config.lldb_build_root != "":
16771681
config.available_features.add('lldb')
1678-
# Note: using the same approach to locating the lib dir as in
1679-
# finishSwigPythonLLDB.py in the lldb repo
1680-
python_lib_dir = get_python_lib(True, False, config.lldb_build_root)
1681-
config.substitutions.append(('%lldb-python-path', python_lib_dir))
1682+
lldb_python_path = get_lldb_python_path(config.lldb_build_root)
1683+
config.substitutions.append(('%lldb-python-path', lldb_python_path))
16821684

16831685
# Disable randomized hash seeding by default. Tests need to manually opt in to
16841686
# random seeds by unsetting the SWIFT_DETERMINISTIC_HASHING environment

0 commit comments

Comments
 (0)