diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index 44824d41f37c9..26b96e4a63dd5 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -174,6 +174,12 @@ llvm_canonicalize_cmake_booleans( LLVM_ENABLE_SHARED_LIBS LLDB_IS_64_BITS) +# BEGIN SWIFT +llvm_canonicalize_cmake_booleans( + LLDB_ENABLE_SWIFT_SUPPORT +) +# END SWIFT + # Configure the individual test suites. add_subdirectory(API) add_subdirectory(Shell) diff --git a/lldb/test/Shell/Reproducer/Swift/TestBridging.test b/lldb/test/Shell/Reproducer/Swift/TestBridging.test index 6a146ca1e692c..bf4317d38be36 100644 --- a/lldb/test/Shell/Reproducer/Swift/TestBridging.test +++ b/lldb/test/Shell/Reproducer/Swift/TestBridging.test @@ -1,4 +1,5 @@ # UNSUPPORTED: system-windows, system-freebsd, system-linux +# REQUIRES: swift # This tests replaying a Swift reproducer with bridging. diff --git a/lldb/test/Shell/Reproducer/Swift/TestModule.test b/lldb/test/Shell/Reproducer/Swift/TestModule.test index 4e12560102b08..362261fe2b761 100644 --- a/lldb/test/Shell/Reproducer/Swift/TestModule.test +++ b/lldb/test/Shell/Reproducer/Swift/TestModule.test @@ -1,4 +1,5 @@ # UNSUPPORTED: system-windows, system-freebsd +# REQUIRES: swift # This tests replaying a Swift reproducer with bridging. diff --git a/lldb/test/Shell/Reproducer/Swift/TestSimple.test b/lldb/test/Shell/Reproducer/Swift/TestSimple.test index d13327ee77fa9..5d85f50ae6ffa 100644 --- a/lldb/test/Shell/Reproducer/Swift/TestSimple.test +++ b/lldb/test/Shell/Reproducer/Swift/TestSimple.test @@ -1,4 +1,5 @@ # UNSUPPORTED: system-windows, system-freebsd +# REQUIRES: swift # This tests replaying a simple reproducer. diff --git a/lldb/test/Shell/Reproducer/Swift/TestSwiftInterface.test b/lldb/test/Shell/Reproducer/Swift/TestSwiftInterface.test index 8bc950ec529ad..9d166bf32e922 100644 --- a/lldb/test/Shell/Reproducer/Swift/TestSwiftInterface.test +++ b/lldb/test/Shell/Reproducer/Swift/TestSwiftInterface.test @@ -1,6 +1,7 @@ # Test that reproducers can deal with .swiftinterface files. # REQUIRES: system-darwin +# REQUIRES: swift # # rdar://problem/55564275 # XFAIL: * diff --git a/lldb/test/Shell/Swift/DeserializationFailure.test b/lldb/test/Shell/Swift/DeserializationFailure.test index f1054961a7b30..7bcdb51afda85 100644 --- a/lldb/test/Shell/Swift/DeserializationFailure.test +++ b/lldb/test/Shell/Swift/DeserializationFailure.test @@ -1,4 +1,5 @@ # REQUIRES: system-darwin +# REQUIRES: swift # Tests that error messages from deserializing Swift modules are # printed to the error stream. Architecturally it is not possible to # write this as a dotest.py test. diff --git a/lldb/test/Shell/Swift/DynamicTyperesolutionConflict.test b/lldb/test/Shell/Swift/DynamicTyperesolutionConflict.test index 1b22289dbb6a6..b2e5f8b3e53ee 100644 --- a/lldb/test/Shell/Swift/DynamicTyperesolutionConflict.test +++ b/lldb/test/Shell/Swift/DynamicTyperesolutionConflict.test @@ -1,5 +1,6 @@ # REQUIRES: system-darwin # REQUIRES: rdar50667488 +# REQUIRES: swift # This testcase causes the scratch context to get destroyed by a # conflict that is triggered via dynamic type resolution. The conflict diff --git a/lldb/test/Shell/Swift/MissingVFSOverlay.test b/lldb/test/Shell/Swift/MissingVFSOverlay.test index 2c0da83eefcc7..fbd1e2000fce0 100644 --- a/lldb/test/Shell/Swift/MissingVFSOverlay.test +++ b/lldb/test/Shell/Swift/MissingVFSOverlay.test @@ -1,5 +1,6 @@ # Test that error messages from constructing ClangImporter # are surfaced to the user. +# REQUIRES: swift # RUN: rm -rf %t && mkdir %t && cd %t # RUN: cp %p/../../API/lang/swift/deserialization_failure/Inputs/main.swift %t/main.swift diff --git a/lldb/test/Shell/Swift/No.swiftmodule-ObjC.test b/lldb/test/Shell/Swift/No.swiftmodule-ObjC.test index 5bb095f0c7384..eb206d54ed078 100644 --- a/lldb/test/Shell/Swift/No.swiftmodule-ObjC.test +++ b/lldb/test/Shell/Swift/No.swiftmodule-ObjC.test @@ -1,4 +1,5 @@ # REQUIRES: system-darwin +# REQUIRES: swift # This tests debugging without the presence of a .swiftmodule. # RUN: rm -rf %t && mkdir %t && cd %t diff --git a/lldb/test/Shell/Swift/No.swiftmodule.test b/lldb/test/Shell/Swift/No.swiftmodule.test index e5d8120add8ae..ca58778ca05e8 100644 --- a/lldb/test/Shell/Swift/No.swiftmodule.test +++ b/lldb/test/Shell/Swift/No.swiftmodule.test @@ -1,4 +1,5 @@ # This tests debugging without the presence of a .swiftmodule. +# REQUIRES: swift # RUN: rm -rf %t && mkdir %t && cd %t # diff --git a/lldb/test/Shell/Swift/RemoteASTImport.test b/lldb/test/Shell/Swift/RemoteASTImport.test index 12c8db67c4a49..06522707862a4 100644 --- a/lldb/test/Shell/Swift/RemoteASTImport.test +++ b/lldb/test/Shell/Swift/RemoteASTImport.test @@ -1,4 +1,5 @@ # REQUIRES: system-darwin +# REQUIRES: swift # This tests that RemoteAST querying the dynamic type of a variable # doesn't import any modules into a module SwiftASTContext that diff --git a/lldb/test/Shell/Swift/astcontext_error.test b/lldb/test/Shell/Swift/astcontext_error.test index 1840ee7c1bf93..cfe0692724453 100644 --- a/lldb/test/Shell/Swift/astcontext_error.test +++ b/lldb/test/Shell/Swift/astcontext_error.test @@ -1,3 +1,4 @@ +# REQUIRES: swift # RUN: rm -rf %t && mkdir %t && cd %t # RUN: %target-swiftc -g %S/Inputs/ContextError.swift # RUN: %lldb ContextError -s %s | FileCheck %S/Inputs/ContextError.swift diff --git a/lldb/test/Shell/Swift/cond-breakpoint.test b/lldb/test/Shell/Swift/cond-breakpoint.test index 3346e7306ef61..3cf5a6c60ad66 100644 --- a/lldb/test/Shell/Swift/cond-breakpoint.test +++ b/lldb/test/Shell/Swift/cond-breakpoint.test @@ -1,3 +1,4 @@ +# REQUIRES: swift # RUN: rm -rf %t && mkdir %t && cd %t # RUN: %target-swiftc -g %S/Inputs/main.swift -o a.out # RUN: %lldb a.out -b -s %s 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/Swift/global.test b/lldb/test/Shell/Swift/global.test index 76e2ffe5b6969..17a1e1e7e66f8 100644 --- a/lldb/test/Shell/Swift/global.test +++ b/lldb/test/Shell/Swift/global.test @@ -1,3 +1,5 @@ +# REQUIRES: swift + # RUN: rm -rf %t && mkdir %t && cd %t # RUN: %target-swiftc -g \ # RUN: -module-cache-path %t/cache %S/Inputs/Global.swift \ diff --git a/lldb/test/Shell/Swift/runtime-initialization.test b/lldb/test/Shell/Swift/runtime-initialization.test index 5a68d976e4ef3..6589dea965caa 100644 --- a/lldb/test/Shell/Swift/runtime-initialization.test +++ b/lldb/test/Shell/Swift/runtime-initialization.test @@ -1,3 +1,4 @@ +# REQUIRES: swift # RUN: rm -rf %t && mkdir %t # RUN: %target-swiftc -g \ # RUN: -module-cache-path %t/cache %S/Inputs/RuntimeInit.swift \ diff --git a/lldb/test/Shell/SwiftREPL/Basic.test b/lldb/test/Shell/SwiftREPL/Basic.test index dc5b54a7dc06a..d7fba8631dc57 100644 --- a/lldb/test/Shell/SwiftREPL/Basic.test +++ b/lldb/test/Shell/SwiftREPL/Basic.test @@ -1,4 +1,5 @@ // Basic sanity checking of the REPL. +// REQUIRES: swift // RUN: %lldb --repl --repl-language swift | FileCheck %s --check-prefix=SWIFT // SWIFT: Welcome to {{.*}}Swift diff --git a/lldb/test/Shell/SwiftREPL/BreakpointSimple.test b/lldb/test/Shell/SwiftREPL/BreakpointSimple.test index d462bf6c164fd..d43ce111c14c5 100644 --- a/lldb/test/Shell/SwiftREPL/BreakpointSimple.test +++ b/lldb/test/Shell/SwiftREPL/BreakpointSimple.test @@ -1,5 +1,5 @@ // Test that we can set breakpoints in the REPL. - +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s func foo() -> Int { diff --git a/lldb/test/Shell/SwiftREPL/CFString.test b/lldb/test/Shell/SwiftREPL/CFString.test index 721febb3d9517..2d7b9985dc154 100644 --- a/lldb/test/Shell/SwiftREPL/CFString.test +++ b/lldb/test/Shell/SwiftREPL/CFString.test @@ -1,5 +1,6 @@ // Test that CFString works in the REPL. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s // CHECK: Welcome to {{.*}}Swift diff --git a/lldb/test/Shell/SwiftREPL/Class.test b/lldb/test/Shell/SwiftREPL/Class.test index ed051ba0ff0d5..e649f989f13e0 100644 --- a/lldb/test/Shell/SwiftREPL/Class.test +++ b/lldb/test/Shell/SwiftREPL/Class.test @@ -1,4 +1,5 @@ // Test that we can define and use a basic class. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ComputedProperties.test b/lldb/test/Shell/SwiftREPL/ComputedProperties.test index cb90047417023..6539cf3efbea6 100644 --- a/lldb/test/Shell/SwiftREPL/ComputedProperties.test +++ b/lldb/test/Shell/SwiftREPL/ComputedProperties.test @@ -1,4 +1,5 @@ // Check that we print computed properties correctly. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/CrashArgs.test b/lldb/test/Shell/SwiftREPL/CrashArgs.test index eebd222bb1aea..f503dbfe465ed 100644 --- a/lldb/test/Shell/SwiftREPL/CrashArgs.test +++ b/lldb/test/Shell/SwiftREPL/CrashArgs.test @@ -1,4 +1,5 @@ // Make sure we don't crash if we pass args to the repl. +// REQUIRES: swift // RUN: %lldb --repl="-some-argument" | FileCheck %s --check-prefix=SWIFT // SWIFT: Welcome to {{.*}}Swift diff --git a/lldb/test/Shell/SwiftREPL/Deadlock.test b/lldb/test/Shell/SwiftREPL/Deadlock.test index b203428d39681..fa996871d59ad 100644 --- a/lldb/test/Shell/SwiftREPL/Deadlock.test +++ b/lldb/test/Shell/SwiftREPL/Deadlock.test @@ -1,3 +1,5 @@ +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s // From https://bugs.swift.org/browse/SR-7114 @@ -5,11 +7,11 @@ let a = 9007199254740991.0 // CHECK: a: Double = 9007199254740991 -(a * a - a * a).squareRoot() +(a * a - a * a).squareRoot() // CHECK: (Double) = { // CHECK-NEXT: _value = 0 // CHECK-NEXT: } (a * a).addingProduct(-a, a).squareRoot() // CHECK: (Double) = { -// CHECK-NEXT: _value = NaN +// CHECK-NEXT: _value = NaN // CHECK-NEXT: } diff --git a/lldb/test/Shell/SwiftREPL/DeferredNSArray.test b/lldb/test/Shell/SwiftREPL/DeferredNSArray.test index fc994f14622a5..b32633363a583 100644 --- a/lldb/test/Shell/SwiftREPL/DeferredNSArray.test +++ b/lldb/test/Shell/SwiftREPL/DeferredNSArray.test @@ -1,5 +1,6 @@ // Test that NSDeferredArray data formatter works. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/DeploymentTarget.test b/lldb/test/Shell/SwiftREPL/DeploymentTarget.test index 62fed643676f1..ab18d90ba577c 100644 --- a/lldb/test/Shell/SwiftREPL/DeploymentTarget.test +++ b/lldb/test/Shell/SwiftREPL/DeploymentTarget.test @@ -1,5 +1,6 @@ // Test that the REPL can call a *really* new function. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: echo -n "@available(macOS " >%t.swift // RUN: python -c 'from __future__ import print_function; import platform; print(platform.mac_ver()[0],end="")' >>%t.swift diff --git a/lldb/test/Shell/SwiftREPL/Dict.test b/lldb/test/Shell/SwiftREPL/Dict.test index dd6b9ead68a11..3e1ef2b9ac76c 100644 --- a/lldb/test/Shell/SwiftREPL/Dict.test +++ b/lldb/test/Shell/SwiftREPL/Dict.test @@ -1,4 +1,5 @@ // Test that the dictionary data formatter works in the REPL. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=DICT diff --git a/lldb/test/Shell/SwiftREPL/DictBridging.test b/lldb/test/Shell/SwiftREPL/DictBridging.test index e7bae8548e94c..68ad3f2ea026c 100644 --- a/lldb/test/Shell/SwiftREPL/DictBridging.test +++ b/lldb/test/Shell/SwiftREPL/DictBridging.test @@ -1,6 +1,8 @@ // -*- mode: swift; -*- // Test formatters on bridged dictionaries in the REPL. // REQUIRES: system-darwin +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=DICT import Foundation diff --git a/lldb/test/Shell/SwiftREPL/ErrorReturn.test b/lldb/test/Shell/SwiftREPL/ErrorReturn.test index 025bb92f88d0d..e61733687b4b5 100644 --- a/lldb/test/Shell/SwiftREPL/ErrorReturn.test +++ b/lldb/test/Shell/SwiftREPL/ErrorReturn.test @@ -1,6 +1,7 @@ // XFAIL: powerpc64le // SR-10212 // Test that we can handle errors. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ErrorReturnObjC.test b/lldb/test/Shell/SwiftREPL/ErrorReturnObjC.test index 304cc136329b5..718958d6490ce 100644 --- a/lldb/test/Shell/SwiftREPL/ErrorReturnObjC.test +++ b/lldb/test/Shell/SwiftREPL/ErrorReturnObjC.test @@ -2,6 +2,7 @@ // types when they're stored in REPL-defined globals. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ExclusivityREPL.test b/lldb/test/Shell/SwiftREPL/ExclusivityREPL.test index 030187700d52d..e8f1ed47ac7eb 100644 --- a/lldb/test/Shell/SwiftREPL/ExclusivityREPL.test +++ b/lldb/test/Shell/SwiftREPL/ExclusivityREPL.test @@ -1,4 +1,5 @@ // Runtime checks for exclusive access should be enabled in the REPL. +// REQUIRES: swift // RUN: %lldb --repl < %s 2>&1 | FileCheck %s // CHECK: modification requires exclusive access diff --git a/lldb/test/Shell/SwiftREPL/FoundationTypes.test b/lldb/test/Shell/SwiftREPL/FoundationTypes.test index e25acce3fb266..a39d8c95daf47 100644 --- a/lldb/test/Shell/SwiftREPL/FoundationTypes.test +++ b/lldb/test/Shell/SwiftREPL/FoundationTypes.test @@ -2,6 +2,7 @@ // types when they're stored in REPL-defined globals. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/FrameworkPath.test b/lldb/test/Shell/SwiftREPL/FrameworkPath.test index b6e73e11af21f..95d0019ce41e4 100644 --- a/lldb/test/Shell/SwiftREPL/FrameworkPath.test +++ b/lldb/test/Shell/SwiftREPL/FrameworkPath.test @@ -1,5 +1,6 @@ // Test target.swift-framework-search-paths works in the REPL. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb -O "settings set target.swift-framework-search-paths %S/Inputs/Frameworks" --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/GLKIT.test b/lldb/test/Shell/SwiftREPL/GLKIT.test index 8260006a82654..ddeaa1b5bd92f 100644 --- a/lldb/test/Shell/SwiftREPL/GLKIT.test +++ b/lldb/test/Shell/SwiftREPL/GLKIT.test @@ -1,5 +1,6 @@ // Test formatters for Accelerate/simd. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/GenericTypealias.test b/lldb/test/Shell/SwiftREPL/GenericTypealias.test index bbd0792ff948c..032aacd9f7eb8 100644 --- a/lldb/test/Shell/SwiftREPL/GenericTypealias.test +++ b/lldb/test/Shell/SwiftREPL/GenericTypealias.test @@ -1,4 +1,6 @@ // Test that generic typealiases are reconstructed correctly. +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s class Tinky { diff --git a/lldb/test/Shell/SwiftREPL/Generics.test b/lldb/test/Shell/SwiftREPL/Generics.test index 9674453acedfe..eaf8598a1c3b9 100644 --- a/lldb/test/Shell/SwiftREPL/Generics.test +++ b/lldb/test/Shell/SwiftREPL/Generics.test @@ -1,4 +1,5 @@ // Test that generics work in the REPL. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ImportCocoa.test b/lldb/test/Shell/SwiftREPL/ImportCocoa.test index 3d15ad2874b6f..ce2f4f20aaf84 100644 --- a/lldb/test/Shell/SwiftREPL/ImportCocoa.test +++ b/lldb/test/Shell/SwiftREPL/ImportCocoa.test @@ -1,5 +1,6 @@ // Test that importing Cocoa works. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ImportDispatch.test b/lldb/test/Shell/SwiftREPL/ImportDispatch.test index b36eae691b2aa..b1cc611245063 100644 --- a/lldb/test/Shell/SwiftREPL/ImportDispatch.test +++ b/lldb/test/Shell/SwiftREPL/ImportDispatch.test @@ -1,5 +1,6 @@ // Test that importing Dispatch works. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ImportError.test b/lldb/test/Shell/SwiftREPL/ImportError.test index 44fe179103c57..435f3554014c0 100644 --- a/lldb/test/Shell/SwiftREPL/ImportError.test +++ b/lldb/test/Shell/SwiftREPL/ImportError.test @@ -1,4 +1,5 @@ // Test that importing non-existing module fails. +// REQUIRES: swift // RUN: %lldb --repl < %s 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ImportFoundation.test b/lldb/test/Shell/SwiftREPL/ImportFoundation.test index a3b481bdad897..751f83ccbb533 100644 --- a/lldb/test/Shell/SwiftREPL/ImportFoundation.test +++ b/lldb/test/Shell/SwiftREPL/ImportFoundation.test @@ -1,5 +1,6 @@ // Test that type lookup chooses the right language. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/InitFile.test b/lldb/test/Shell/SwiftREPL/InitFile.test index b3363df20d4a8..a3fefab62c919 100644 --- a/lldb/test/Shell/SwiftREPL/InitFile.test +++ b/lldb/test/Shell/SwiftREPL/InitFile.test @@ -1,5 +1,7 @@ // Test that the Swift REPL init file works. // REQUIRES: system-darwin +// REQUIRES: swift + // RUN: export HOME=%t // RUN: mkdir -p %t // RUN: echo 'br set -f main.c -l 123' > ~/.lldbinit diff --git a/lldb/test/Shell/SwiftREPL/LookupAfterImport.test b/lldb/test/Shell/SwiftREPL/LookupAfterImport.test index d067501e5f155..ae763e2bb5895 100644 --- a/lldb/test/Shell/SwiftREPL/LookupAfterImport.test +++ b/lldb/test/Shell/SwiftREPL/LookupAfterImport.test @@ -1,5 +1,6 @@ // Make sure we properly load in new extension members after an import. // rdar://64040436 +// REQUIRES: swift // RUN: rm -rf %t // RUN: mkdir %t diff --git a/lldb/test/Shell/SwiftREPL/MetatypeRepl.test b/lldb/test/Shell/SwiftREPL/MetatypeRepl.test index ad88d7dae1f30..979286e442b37 100644 --- a/lldb/test/Shell/SwiftREPL/MetatypeRepl.test +++ b/lldb/test/Shell/SwiftREPL/MetatypeRepl.test @@ -1,3 +1,5 @@ +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s let x = [Double.self] diff --git a/lldb/test/Shell/SwiftREPL/NSObjectSubclass.test b/lldb/test/Shell/SwiftREPL/NSObjectSubclass.test index 0b9784527f96a..fbf8db07d531a 100644 --- a/lldb/test/Shell/SwiftREPL/NSObjectSubclass.test +++ b/lldb/test/Shell/SwiftREPL/NSObjectSubclass.test @@ -1,5 +1,6 @@ // Test that the REPL allows defining subclasses of NSObject. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/NSString.test b/lldb/test/Shell/SwiftREPL/NSString.test index 34fa250947a79..f31a73eb4481d 100644 --- a/lldb/test/Shell/SwiftREPL/NSString.test +++ b/lldb/test/Shell/SwiftREPL/NSString.test @@ -1,5 +1,6 @@ // Test that NSString works in the REPL. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=NSSTRING diff --git a/lldb/test/Shell/SwiftREPL/OpenClass.test b/lldb/test/Shell/SwiftREPL/OpenClass.test index 4239f8e337b8a..a32b1d6be1cd5 100644 --- a/lldb/test/Shell/SwiftREPL/OpenClass.test +++ b/lldb/test/Shell/SwiftREPL/OpenClass.test @@ -1,4 +1,5 @@ // RUN: %lldb --repl < %s 2>&1 | FileCheck %s +// REQUIRES: swift class Foo { // Don't make any of these 'open'. diff --git a/lldb/test/Shell/SwiftREPL/Optional.test b/lldb/test/Shell/SwiftREPL/Optional.test index b6d3ac77b12c1..47e9749f190e8 100644 --- a/lldb/test/Shell/SwiftREPL/Optional.test +++ b/lldb/test/Shell/SwiftREPL/Optional.test @@ -1,4 +1,5 @@ // RUN: %lldb --repl < %s | FileCheck %s +// REQUIRES: swift enum Patatino { case first diff --git a/lldb/test/Shell/SwiftREPL/OptionalUnowned.test b/lldb/test/Shell/SwiftREPL/OptionalUnowned.test index 4d3e8aa2e9e19..c855e97868e43 100644 --- a/lldb/test/Shell/SwiftREPL/OptionalUnowned.test +++ b/lldb/test/Shell/SwiftREPL/OptionalUnowned.test @@ -1,3 +1,5 @@ +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s class C diff --git a/lldb/test/Shell/SwiftREPL/OptionalWithDynamicType.test b/lldb/test/Shell/SwiftREPL/OptionalWithDynamicType.test index 56f8499931864..a52a53766b4ee 100644 --- a/lldb/test/Shell/SwiftREPL/OptionalWithDynamicType.test +++ b/lldb/test/Shell/SwiftREPL/OptionalWithDynamicType.test @@ -2,6 +2,7 @@ // optional. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/PropertyWrapperPrivate.test b/lldb/test/Shell/SwiftREPL/PropertyWrapperPrivate.test index 4e982cbb97463..af9c34fd4a4a8 100644 --- a/lldb/test/Shell/SwiftREPL/PropertyWrapperPrivate.test +++ b/lldb/test/Shell/SwiftREPL/PropertyWrapperPrivate.test @@ -1,5 +1,6 @@ // Test that we don't crash when SILGen(ing) property wrappers // [private]. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/PropertyWrapperPublic.test b/lldb/test/Shell/SwiftREPL/PropertyWrapperPublic.test index 2da16b84ac186..5d0cade5b25cd 100644 --- a/lldb/test/Shell/SwiftREPL/PropertyWrapperPublic.test +++ b/lldb/test/Shell/SwiftREPL/PropertyWrapperPublic.test @@ -1,5 +1,6 @@ // Test that we don't crash when SILGen(ing) property wrappers // [public]. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/PropertyWrapperTopLevel.test b/lldb/test/Shell/SwiftREPL/PropertyWrapperTopLevel.test index 3ad2007532aed..99dee0ae85957 100644 --- a/lldb/test/Shell/SwiftREPL/PropertyWrapperTopLevel.test +++ b/lldb/test/Shell/SwiftREPL/PropertyWrapperTopLevel.test @@ -1,3 +1,5 @@ +// REQUIRES: swift + // RUN: %lldb --repl < %s 2>&1 | FileCheck %s @propertyWrapper struct A { diff --git a/lldb/test/Shell/SwiftREPL/RecursiveClass.test b/lldb/test/Shell/SwiftREPL/RecursiveClass.test index c002c7580d5d3..f36ed92d6ada9 100644 --- a/lldb/test/Shell/SwiftREPL/RecursiveClass.test +++ b/lldb/test/Shell/SwiftREPL/RecursiveClass.test @@ -1,4 +1,5 @@ // Test that recursive class instances work in the REPL. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/Redefinition.test b/lldb/test/Shell/SwiftREPL/Redefinition.test index 11aebcd36f768..a265e92756b64 100644 --- a/lldb/test/Shell/SwiftREPL/Redefinition.test +++ b/lldb/test/Shell/SwiftREPL/Redefinition.test @@ -1,4 +1,5 @@ // Test that we can set breakpoints in the REPL. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/RedirectInput.test b/lldb/test/Shell/SwiftREPL/RedirectInput.test index be48c037ffcb9..eadb5d7ef3566 100644 --- a/lldb/test/Shell/SwiftREPL/RedirectInput.test +++ b/lldb/test/Shell/SwiftREPL/RedirectInput.test @@ -1,4 +1,5 @@ // Test that input can be redirected from A.swift +// REQUIRES: swift // RUN: mkdir -p %t // RUN: cp %S/Inputs/A.swift %t/A.swift diff --git a/lldb/test/Shell/SwiftREPL/RedirectInputNoSuchFile.test b/lldb/test/Shell/SwiftREPL/RedirectInputNoSuchFile.test index d0b6c847145cd..c76364138ba55 100644 --- a/lldb/test/Shell/SwiftREPL/RedirectInputNoSuchFile.test +++ b/lldb/test/Shell/SwiftREPL/RedirectInputNoSuchFile.test @@ -1,4 +1,5 @@ // Test that input can't be redirected from non-existent file A.swift +// REQUIRES: swift // RUN: mkdir -p %t // RUN: cd %t diff --git a/lldb/test/Shell/SwiftREPL/RedirectInputUnreadable.test b/lldb/test/Shell/SwiftREPL/RedirectInputUnreadable.test index a252673f43a69..8f74532d1bded 100644 --- a/lldb/test/Shell/SwiftREPL/RedirectInputUnreadable.test +++ b/lldb/test/Shell/SwiftREPL/RedirectInputUnreadable.test @@ -1,4 +1,5 @@ // Test that input can't be redirected from unreadable A.swift +// REQUIRES: swift // RUN: mkdir -p %t // RUN: cp %S/Inputs/A.swift %t/A.swift diff --git a/lldb/test/Shell/SwiftREPL/ResilientArray.test b/lldb/test/Shell/SwiftREPL/ResilientArray.test index 38d3fbdebe6c2..dbf9006cd2b2b 100644 --- a/lldb/test/Shell/SwiftREPL/ResilientArray.test +++ b/lldb/test/Shell/SwiftREPL/ResilientArray.test @@ -1,4 +1,6 @@ // REQUIRES: system-darwin +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s import Foundation diff --git a/lldb/test/Shell/SwiftREPL/ResilientDict.test b/lldb/test/Shell/SwiftREPL/ResilientDict.test index 0b7eea68d73c0..6be96a29ec12e 100644 --- a/lldb/test/Shell/SwiftREPL/ResilientDict.test +++ b/lldb/test/Shell/SwiftREPL/ResilientDict.test @@ -1,4 +1,6 @@ // REQUIRES: system-darwin +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=DICT // The dictionary order isn't deterministic, so print the dictionary @@ -6,14 +8,14 @@ import Foundation -let x : [URL:Int] = [URL(string: "https://github.com")!: 4, URL(string: "https://apple.com")!: 23] +let x : [URL:Int] = [URL(string: "https://github.com")!: 4, URL(string: "https://apple.com")!: 23] // DICT-LABEL: {{x}}: [URL : Int] = 2 key/value pairs { // DICT: [{{[0-1]}}] = { // DICT: key = "https://apple.com" // DICT-NEXT: value = 23 // DICT-NEXT: } -let y : [URL:Int] = [URL(string: "https://github.com")!: 4, URL(string: "https://apple.com")!: 23] +let y : [URL:Int] = [URL(string: "https://github.com")!: 4, URL(string: "https://apple.com")!: 23] // DICT-LABEL: {{y}}: [URL : Int] = 2 key/value pairs { // DICT: [{{[0-1]}}] = { // DICT: key = "https://github.com" diff --git a/lldb/test/Shell/SwiftREPL/SIMD.test b/lldb/test/Shell/SwiftREPL/SIMD.test index 708b944ef4b45..c4fb14c7ccf71 100644 --- a/lldb/test/Shell/SwiftREPL/SIMD.test +++ b/lldb/test/Shell/SwiftREPL/SIMD.test @@ -1,5 +1,6 @@ // Test formatters for SIMD. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/SetBridging.test b/lldb/test/Shell/SwiftREPL/SetBridging.test index 4c7aca292f144..98d70e13e2853 100644 --- a/lldb/test/Shell/SwiftREPL/SetBridging.test +++ b/lldb/test/Shell/SwiftREPL/SetBridging.test @@ -1,6 +1,8 @@ // -*- mode: swift; -*- // Test formatters on bridged sets in the REPL. // REQUIRES: system-darwin +// REQUIRES: swift + // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=SET import Foundation diff --git a/lldb/test/Shell/SwiftREPL/SimpleExpressions.test b/lldb/test/Shell/SwiftREPL/SimpleExpressions.test index 5b65ddb500dab..8331973801a05 100644 --- a/lldb/test/Shell/SwiftREPL/SimpleExpressions.test +++ b/lldb/test/Shell/SwiftREPL/SimpleExpressions.test @@ -1,5 +1,6 @@ // Test that we can define and use basic functions/expressions in the REPL. // Note: All of this should work on all supported platforms. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/SleepREPL.test b/lldb/test/Shell/SwiftREPL/SleepREPL.test index 13f254520f0ab..0f480afc41862 100644 --- a/lldb/test/Shell/SwiftREPL/SleepREPL.test +++ b/lldb/test/Shell/SwiftREPL/SleepREPL.test @@ -1,5 +1,6 @@ // Test that we can sleep in the repl // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=SLEEP diff --git a/lldb/test/Shell/SwiftREPL/String.test b/lldb/test/Shell/SwiftREPL/String.test index 3aaa00ca964b1..2d5e50ccd0057 100644 --- a/lldb/test/Shell/SwiftREPL/String.test +++ b/lldb/test/Shell/SwiftREPL/String.test @@ -1,5 +1,6 @@ // Test that String works in the REPL. // REQUIRES: system-darwin +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=STRING diff --git a/lldb/test/Shell/SwiftREPL/Struct.test b/lldb/test/Shell/SwiftREPL/Struct.test index 842125f91d7bc..5f86fa6759bc9 100644 --- a/lldb/test/Shell/SwiftREPL/Struct.test +++ b/lldb/test/Shell/SwiftREPL/Struct.test @@ -1,4 +1,5 @@ // Test that we can define and use structs in the REPL. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/Subclassing.test b/lldb/test/Shell/SwiftREPL/Subclassing.test index fb81821a22df3..c99bdb43d70ac 100644 --- a/lldb/test/Shell/SwiftREPL/Subclassing.test +++ b/lldb/test/Shell/SwiftREPL/Subclassing.test @@ -1,4 +1,5 @@ // Test that subclassing works in the repl. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/SwiftInterface.test b/lldb/test/Shell/SwiftREPL/SwiftInterface.test index 558d3598d5702..37e9bfcddc879 100644 --- a/lldb/test/Shell/SwiftREPL/SwiftInterface.test +++ b/lldb/test/Shell/SwiftREPL/SwiftInterface.test @@ -1,4 +1,5 @@ // Test that .swiftinterface files can be loaded via the repl. +// REQUIRES: swift // RUN: rm -rf %t // RUN: mkdir %t diff --git a/lldb/test/Shell/SwiftREPL/SwiftInterfaceForceModuleLoadMode.test b/lldb/test/Shell/SwiftREPL/SwiftInterfaceForceModuleLoadMode.test index 4bec05e5a6ffc..ac71e2c198458 100644 --- a/lldb/test/Shell/SwiftREPL/SwiftInterfaceForceModuleLoadMode.test +++ b/lldb/test/Shell/SwiftREPL/SwiftInterfaceForceModuleLoadMode.test @@ -3,6 +3,7 @@ // Note: It intentionally does not check the only-interface or prefer-interface // modes as this also causes the Swift stdlib to be loaded via its module // interface file, which slows down this test considerably. +// REQUIRES: swift // RUN: rm -rf %t && mkdir %t diff --git a/lldb/test/Shell/SwiftREPL/SwiftTypeLookup.test b/lldb/test/Shell/SwiftREPL/SwiftTypeLookup.test index 0a5d67c75cd74..d320a4c1a3066 100644 --- a/lldb/test/Shell/SwiftREPL/SwiftTypeLookup.test +++ b/lldb/test/Shell/SwiftREPL/SwiftTypeLookup.test @@ -1,4 +1,5 @@ // Test that we don't crash when looking up types. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=TYPE diff --git a/lldb/test/Shell/SwiftREPL/UninitVariables.test b/lldb/test/Shell/SwiftREPL/UninitVariables.test index f30dd331da692..e35a1fb9b8abb 100644 --- a/lldb/test/Shell/SwiftREPL/UninitVariables.test +++ b/lldb/test/Shell/SwiftREPL/UninitVariables.test @@ -1,4 +1,5 @@ // Document the way we handle uninitialized variables. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/ZeroSizeStruct.test b/lldb/test/Shell/SwiftREPL/ZeroSizeStruct.test index d30a4cc5b13a7..add267619f50a 100644 --- a/lldb/test/Shell/SwiftREPL/ZeroSizeStruct.test +++ b/lldb/test/Shell/SwiftREPL/ZeroSizeStruct.test @@ -1,4 +1,5 @@ // Test that we can define and use zero-sized struct in the repl. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s diff --git a/lldb/test/Shell/SwiftREPL/enum-singlecase.test b/lldb/test/Shell/SwiftREPL/enum-singlecase.test index ced4eb9c8a957..aec724705f2da 100644 --- a/lldb/test/Shell/SwiftREPL/enum-singlecase.test +++ b/lldb/test/Shell/SwiftREPL/enum-singlecase.test @@ -1,4 +1,5 @@ // RUN: %lldb --repl < %s 2>&1 | FileCheck %s +// REQUIRES: swift enum Foo: String { case patatino diff --git a/lldb/test/Shell/SwiftREPL/one-char-string.test b/lldb/test/Shell/SwiftREPL/one-char-string.test index 9c98f4fafd3c1..2afb920b8f0b9 100644 --- a/lldb/test/Shell/SwiftREPL/one-char-string.test +++ b/lldb/test/Shell/SwiftREPL/one-char-string.test @@ -1,5 +1,6 @@ // rdar://30147367 // Make sure that single character strings are displayed correctly. +// REQUIRES: swift // RUN: %lldb --repl < %s | FileCheck %s --check-prefix=STRING diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py index ef4d9f6dc7ec1..f36bbfa6e01f8 100644 --- a/lldb/test/Shell/lit.cfg.py +++ b/lldb/test/Shell/lit.cfg.py @@ -121,6 +121,9 @@ def calculate_arch_features(arch_string): if config.lldb_enable_lua: config.available_features.add('lua') +if config.lldb_enable_swift: + config.available_features.add('swift') + if config.lldb_enable_lzma: config.available_features.add('lzma') diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in index a89c6c7eab11d..04800cfb0c828 100644 --- a/lldb/test/Shell/lit.site.cfg.py.in +++ b/lldb/test/Shell/lit.site.cfg.py.in @@ -16,6 +16,7 @@ config.lldb_lit_tools_dir = r"@LLDB_LIT_TOOLS_DIR@" config.target_triple = "@TARGET_TRIPLE@" config.python_executable = "@Python3_EXECUTABLE@" config.swiftc = "@LLDB_SWIFTC@" +config.lldb_enable_swift = @LLDB_ENABLE_SWIFT_SUPPORT@ config.have_zlib = @LLVM_ENABLE_ZLIB@ config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@ config.host_triple = "@LLVM_HOST_TRIPLE@"