Skip to content

Commit 9a14690

Browse files
authored
Merge pull request #1893 from Teemperor/RunSwiftShellTestsOnlyWhenSwiftEnabled
[lldb][swift] Only run Swift Shell tests when Swift support is enabled
2 parents 6cdb2c3 + 779364a commit 9a14690

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+95
-5
lines changed

lldb/test/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ llvm_canonicalize_cmake_booleans(
174174
LLVM_ENABLE_SHARED_LIBS
175175
LLDB_IS_64_BITS)
176176

177+
# BEGIN SWIFT
178+
llvm_canonicalize_cmake_booleans(
179+
LLDB_ENABLE_SWIFT_SUPPORT
180+
)
181+
# END SWIFT
182+
177183
# Configure the individual test suites.
178184
add_subdirectory(API)
179185
add_subdirectory(Shell)

lldb/test/Shell/Reproducer/Swift/TestBridging.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# UNSUPPORTED: system-windows, system-freebsd, system-linux
2+
# REQUIRES: swift
23

34
# This tests replaying a Swift reproducer with bridging.
45

lldb/test/Shell/Reproducer/Swift/TestModule.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# UNSUPPORTED: system-windows, system-freebsd
2+
# REQUIRES: swift
23

34
# This tests replaying a Swift reproducer with bridging.
45

lldb/test/Shell/Reproducer/Swift/TestSimple.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# UNSUPPORTED: system-windows, system-freebsd
2+
# REQUIRES: swift
23

34
# This tests replaying a simple reproducer.
45

lldb/test/Shell/Reproducer/Swift/TestSwiftInterface.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Test that reproducers can deal with .swiftinterface files.
22

33
# REQUIRES: system-darwin
4+
# REQUIRES: swift
45
#
56
# rdar://problem/55564275
67
# XFAIL: *

lldb/test/Shell/Swift/DeserializationFailure.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# REQUIRES: system-darwin
2+
# REQUIRES: swift
23
# Tests that error messages from deserializing Swift modules are
34
# printed to the error stream. Architecturally it is not possible to
45
# write this as a dotest.py test.

lldb/test/Shell/Swift/DynamicTyperesolutionConflict.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# REQUIRES: system-darwin
22
# REQUIRES: rdar50667488
3+
# REQUIRES: swift
34

45
# This testcase causes the scratch context to get destroyed by a
56
# conflict that is triggered via dynamic type resolution. The conflict

lldb/test/Shell/Swift/MissingVFSOverlay.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Test that error messages from constructing ClangImporter
22
# are surfaced to the user.
3+
# REQUIRES: swift
34

45
# RUN: rm -rf %t && mkdir %t && cd %t
56
# RUN: cp %p/../../API/lang/swift/deserialization_failure/Inputs/main.swift %t/main.swift

lldb/test/Shell/Swift/No.swiftmodule-ObjC.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# REQUIRES: system-darwin
2+
# REQUIRES: swift
23
# This tests debugging without the presence of a .swiftmodule.
34

45
# RUN: rm -rf %t && mkdir %t && cd %t

lldb/test/Shell/Swift/No.swiftmodule.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# This tests debugging without the presence of a .swiftmodule.
2+
# REQUIRES: swift
23

34
# RUN: rm -rf %t && mkdir %t && cd %t
45
#

lldb/test/Shell/Swift/RemoteASTImport.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# REQUIRES: system-darwin
2+
# REQUIRES: swift
23

34
# This tests that RemoteAST querying the dynamic type of a variable
45
# doesn't import any modules into a module SwiftASTContext that

lldb/test/Shell/Swift/astcontext_error.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: swift
12
# RUN: rm -rf %t && mkdir %t && cd %t
23
# RUN: %target-swiftc -g %S/Inputs/ContextError.swift
34
# RUN: %lldb ContextError -s %s | FileCheck %S/Inputs/ContextError.swift

lldb/test/Shell/Swift/cond-breakpoint.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: swift
12
# RUN: rm -rf %t && mkdir %t && cd %t
23
# RUN: %target-swiftc -g %S/Inputs/main.swift -o a.out
34
# RUN: %lldb a.out -b -s %s 2>&1 | FileCheck %s

lldb/test/Shell/Swift/global.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# REQUIRES: swift
2+
13
# RUN: rm -rf %t && mkdir %t && cd %t
24
# RUN: %target-swiftc -g \
35
# RUN: -module-cache-path %t/cache %S/Inputs/Global.swift \

lldb/test/Shell/Swift/runtime-initialization.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: swift
12
# RUN: rm -rf %t && mkdir %t
23
# RUN: %target-swiftc -g \
34
# RUN: -module-cache-path %t/cache %S/Inputs/RuntimeInit.swift \

lldb/test/Shell/SwiftREPL/Basic.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Basic sanity checking of the REPL.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl --repl-language swift | FileCheck %s --check-prefix=SWIFT
45
// SWIFT: Welcome to {{.*}}Swift

lldb/test/Shell/SwiftREPL/BreakpointSimple.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Test that we can set breakpoints in the REPL.
2-
2+
// REQUIRES: swift
33
// RUN: %lldb --repl < %s | FileCheck %s
44

55
func foo() -> Int {

lldb/test/Shell/SwiftREPL/CFString.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that CFString works in the REPL.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56
// CHECK: Welcome to {{.*}}Swift

lldb/test/Shell/SwiftREPL/Class.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that we can define and use a basic class.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s | FileCheck %s
45

lldb/test/Shell/SwiftREPL/ComputedProperties.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Check that we print computed properties correctly.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s | FileCheck %s
45

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Make sure we don't crash if we pass args to the repl.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl="-some-argument" | FileCheck %s --check-prefix=SWIFT
45
// SWIFT: Welcome to {{.*}}Swift
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
// REQUIRES: swift
2+
13
// RUN: %lldb --repl < %s | FileCheck %s
24

35
// From https://bugs.swift.org/browse/SR-7114
46
// This sequence was deadlocking.
57

68
let a = 9007199254740991.0
79
// CHECK: a: Double = 9007199254740991
8-
(a * a - a * a).squareRoot()
10+
(a * a - a * a).squareRoot()
911
// CHECK: (Double) = {
1012
// CHECK-NEXT: _value = 0
1113
// CHECK-NEXT: }
1214
(a * a).addingProduct(-a, a).squareRoot()
1315
// CHECK: (Double) = {
14-
// CHECK-NEXT: _value = NaN
16+
// CHECK-NEXT: _value = NaN
1517
// CHECK-NEXT: }

lldb/test/Shell/SwiftREPL/DeferredNSArray.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that NSDeferredArray data formatter works.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/DeploymentTarget.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that the REPL can call a *really* new function.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: echo -n "@available(macOS " >%t.swift
56
// RUN: python -c 'from __future__ import print_function; import platform; print(platform.mac_ver()[0],end="")' >>%t.swift

lldb/test/Shell/SwiftREPL/Dict.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that the dictionary data formatter works in the REPL.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s | FileCheck %s --check-prefix=DICT
45

lldb/test/Shell/SwiftREPL/DictBridging.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// -*- mode: swift; -*-
22
// Test formatters on bridged dictionaries in the REPL.
33
// REQUIRES: system-darwin
4+
// REQUIRES: swift
5+
46
// RUN: %lldb --repl < %s | FileCheck %s --check-prefix=DICT
57

68
import Foundation

lldb/test/Shell/SwiftREPL/ErrorReturn.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// XFAIL: powerpc64le
22
// SR-10212
33
// Test that we can handle errors.
4+
// REQUIRES: swift
45

56
// RUN: %lldb --repl < %s | FileCheck %s
67

lldb/test/Shell/SwiftREPL/ErrorReturnObjC.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// types when they're stored in REPL-defined globals.
33

44
// REQUIRES: system-darwin
5+
// REQUIRES: swift
56

67
// RUN: %lldb --repl < %s | FileCheck %s
78

lldb/test/Shell/SwiftREPL/ExclusivityREPL.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Runtime checks for exclusive access should be enabled in the REPL.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
45
// CHECK: modification requires exclusive access

lldb/test/Shell/SwiftREPL/FoundationTypes.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// types when they're stored in REPL-defined globals.
33

44
// REQUIRES: system-darwin
5+
// REQUIRES: swift
56

67
// RUN: %lldb --repl < %s | FileCheck %s
78

lldb/test/Shell/SwiftREPL/FrameworkPath.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test target.swift-framework-search-paths works in the REPL.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb -O "settings set target.swift-framework-search-paths %S/Inputs/Frameworks" --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/GLKIT.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test formatters for Accelerate/simd.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/GenericTypealias.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Test that generic typealiases are reconstructed correctly.
2+
// REQUIRES: swift
3+
24
// RUN: %lldb --repl < %s | FileCheck %s
35

46
class Tinky<T> {

lldb/test/Shell/SwiftREPL/Generics.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that generics work in the REPL.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s | FileCheck %s
45

lldb/test/Shell/SwiftREPL/ImportCocoa.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that importing Cocoa works.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
56

lldb/test/Shell/SwiftREPL/ImportDispatch.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that importing Dispatch works.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
56

lldb/test/Shell/SwiftREPL/ImportError.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that importing non-existing module fails.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
45

lldb/test/Shell/SwiftREPL/ImportFoundation.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that type lookup chooses the right language.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/InitFile.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Test that the Swift REPL init file works.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
4+
35
// RUN: export HOME=%t
46
// RUN: mkdir -p %t
57
// RUN: echo 'br set -f main.c -l 123' > ~/.lldbinit

lldb/test/Shell/SwiftREPL/LookupAfterImport.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Make sure we properly load in new extension members after an import.
22
// rdar://64040436
3+
// REQUIRES: swift
34

45
// RUN: rm -rf %t
56
// RUN: mkdir %t

lldb/test/Shell/SwiftREPL/MetatypeRepl.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: swift
2+
13
// RUN: %lldb --repl < %s | FileCheck %s
24

35
let x = [Double.self]

lldb/test/Shell/SwiftREPL/NSObjectSubclass.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that the REPL allows defining subclasses of NSObject.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/NSString.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that NSString works in the REPL.
22
// REQUIRES: system-darwin
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s --check-prefix=NSSTRING
56

lldb/test/Shell/SwiftREPL/OpenClass.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
2+
// REQUIRES: swift
23

34
class Foo {
45
// Don't make any of these 'open'.

lldb/test/Shell/SwiftREPL/Optional.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %lldb --repl < %s | FileCheck %s
2+
// REQUIRES: swift
23

34
enum Patatino {
45
case first

lldb/test/Shell/SwiftREPL/OptionalUnowned.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: swift
2+
13
// RUN: %lldb --repl < %s | FileCheck %s
24

35
class C

lldb/test/Shell/SwiftREPL/OptionalWithDynamicType.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// optional.
33

44
// REQUIRES: system-darwin
5+
// REQUIRES: swift
56

67
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
78

lldb/test/Shell/SwiftREPL/PropertyWrapperPrivate.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that we don't crash when SILGen(ing) property wrappers
22
// [private].
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/PropertyWrapperPublic.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that we don't crash when SILGen(ing) property wrappers
22
// [public].
3+
// REQUIRES: swift
34

45
// RUN: %lldb --repl < %s | FileCheck %s
56

lldb/test/Shell/SwiftREPL/PropertyWrapperTopLevel.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: swift
2+
13
// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
24

35
@propertyWrapper struct A<T> {

lldb/test/Shell/SwiftREPL/RecursiveClass.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that recursive class instances work in the REPL.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s | FileCheck %s
45

lldb/test/Shell/SwiftREPL/Redefinition.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that we can set breakpoints in the REPL.
2+
// REQUIRES: swift
23

34
// RUN: %lldb --repl < %s | FileCheck %s
45

lldb/test/Shell/SwiftREPL/RedirectInput.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that input can be redirected from A.swift
2+
// REQUIRES: swift
23

34
// RUN: mkdir -p %t
45
// RUN: cp %S/Inputs/A.swift %t/A.swift

lldb/test/Shell/SwiftREPL/RedirectInputNoSuchFile.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that input can't be redirected from non-existent file A.swift
2+
// REQUIRES: swift
23

34
// RUN: mkdir -p %t
45
// RUN: cd %t

lldb/test/Shell/SwiftREPL/RedirectInputUnreadable.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that input can't be redirected from unreadable A.swift
2+
// REQUIRES: swift
23

34
// RUN: mkdir -p %t
45
// RUN: cp %S/Inputs/A.swift %t/A.swift

lldb/test/Shell/SwiftREPL/ResilientArray.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// REQUIRES: system-darwin
2+
// REQUIRES: swift
3+
24
// RUN: %lldb --repl < %s | FileCheck %s
35

46
import Foundation

0 commit comments

Comments
 (0)