Skip to content

Commit 6cdb2c3

Browse files
authored
Merge pull request #1892 from Teemperor/RunSwiftTestsOnlyWithEnabledSwift
[lldb][swift] Only run Swift API tests when Swift support is enabled
2 parents 240312a + 2c911bc commit 6cdb2c3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,9 @@ def skipUnlessTargetAndroid(func):
626626
def swiftTest(func):
627627
"""Decorate the item as a Swift test (Darwin/Linux only, no i386)."""
628628
def is_not_swift_compatible(self):
629+
swift_enabled_error = _get_bool_config_skip_if_decorator("swift")(func)
630+
if swift_enabled_error:
631+
return swift_enabled_error
629632
if self.getDebugInfo() == "gmodules":
630633
return "skipping (gmodules only makes sense for clang tests)"
631634

lldb/source/API/SBDebugger.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,12 @@ SBStructuredData SBDebugger::GetBuildConfiguration() {
702702
"A boolean value that indicates if lua support is enabled in LLDB");
703703
AddLLVMTargets(*config_up);
704704

705+
#ifdef LLDB_ENABLE_SWIFT
706+
AddBoolConfigEntry(
707+
*config_up, "swift", true,
708+
"A boolean value that indicates if Swift support is enabled in LLDB");
709+
#endif // LLDB_ENABLE_SWIFT
710+
705711
SBStructuredData data;
706712
data.m_impl_up->SetObjectSP(std::move(config_up));
707713
return LLDB_RECORD_RESULT(data);

0 commit comments

Comments
 (0)