Skip to content

[test] Fix LLDB Python Path and re-enable linux-fatal-backtrace.swift #29750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/Runtime/linux-fatal-backtrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// REQUIRES: executable_test
// REQUIRES: OS=linux-gnu
// REQUIRES: lldb
// REQUIRES: rdar59328972
// XFAIL: CPU=s390x

// NOTE: not.py is used above instead of "not --crash" because %target-run
Expand Down
10 changes: 6 additions & 4 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def get_simulator_command(run_os, run_cpu, sdk_path):
else:
lit_config.fatal("Unknown simulator OS %r" % run_os)

def get_lldb_python_path(lldb_build_root):
lldb_path = os.path.join(lldb_build_root, 'bin', 'lldb')
return subprocess.check_output([lldb_path, "-P"]).rstrip()

assert darwin_sdk_build_version_cmp("11A1", "12A1") < 0
assert darwin_sdk_build_version_cmp("12A1", "11A1") > 0

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

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

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