Skip to content

Commit 413b8d0

Browse files
authored
Merge pull request #29750 from JDevlieghere/fix-linux-fatal-backtrace.swift
[test] Fix LLDB Python Path and re-enable linux-fatal-backtrace.swift
2 parents db8bf0b + 21327e7 commit 413b8d0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/Runtime/linux-fatal-backtrace.swift

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// REQUIRES: executable_test
55
// REQUIRES: OS=linux-gnu
66
// REQUIRES: lldb
7-
// REQUIRES: rdar59328972
87
// XFAIL: CPU=s390x
98

109
// NOTE: not.py is used above instead of "not --crash" because %target-run

test/lit.cfg

+6-4
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

@@ -1780,10 +1784,8 @@ config.substitutions.append(('%import-libdispatch', getattr(config, 'import_libd
17801784

17811785
if config.lldb_build_root != "":
17821786
config.available_features.add('lldb')
1783-
# Note: using the same approach to locating the lib dir as in
1784-
# finishSwigPythonLLDB.py in the lldb repo
1785-
python_lib_dir = get_python_lib(True, False, config.lldb_build_root)
1786-
config.substitutions.append(('%lldb-python-path', python_lib_dir))
1787+
lldb_python_path = get_lldb_python_path(config.lldb_build_root)
1788+
config.substitutions.append(('%lldb-python-path', lldb_python_path))
17871789

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

0 commit comments

Comments
 (0)