Skip to content

[lldb][swift] Only run Swift API tests when Swift support is enabled #1892

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
3 changes: 3 additions & 0 deletions lldb/packages/Python/lldbsuite/test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ def skipUnlessTargetAndroid(func):
def swiftTest(func):
"""Decorate the item as a Swift test (Darwin/Linux only, no i386)."""
def is_not_swift_compatible(self):
swift_enabled_error = _get_bool_config_skip_if_decorator("swift")(func)
if swift_enabled_error:
return swift_enabled_error
if self.getDebugInfo() == "gmodules":
return "skipping (gmodules only makes sense for clang tests)"

Expand Down
6 changes: 6 additions & 0 deletions lldb/source/API/SBDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,12 @@ SBStructuredData SBDebugger::GetBuildConfiguration() {
"A boolean value that indicates if lua support is enabled in LLDB");
AddLLVMTargets(*config_up);

#ifdef LLDB_ENABLE_SWIFT
AddBoolConfigEntry(
*config_up, "swift", true,
"A boolean value that indicates if Swift support is enabled in LLDB");
#endif // LLDB_ENABLE_SWIFT

SBStructuredData data;
data.m_impl_up->SetObjectSP(std::move(config_up));
return LLDB_RECORD_RESULT(data);
Expand Down