Skip to content

Commit 7853184

Browse files
authored
Enable running tests from test/Concurrency/ directory in freestanding/minimal presets (#61835)
* Enable running tests from test/Concurrency/ directory in freestanding/minimal presets * Mark failing Concurrency tests as XFAIL/SKIP on freestanding/minimal
1 parent 4c2e3e9 commit 7853184

29 files changed

+37
-10
lines changed

test/Concurrency/Backdeploy/mangling.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// REQUIRES: executable_test
1717
// REQUIRES: concurrency_runtime
1818
// UNSUPPORTED: back_deployment_runtime
19+
// UNSUPPORTED: freestanding
1920

2021
actor MyActor { }
2122

test/Concurrency/Backdeploy/objc_actor.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// REQUIRES: OS=macosx
66
// REQUIRES: executable_test
77
// REQUIRES: concurrency_runtime
8+
// REQUIRES: objc_interop
89
// UNSUPPORTED: back_deployment_runtime
910

1011
import Foundation

test/Concurrency/Runtime/actor_counters_freestanding.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// REQUIRES: concurrency
55
// REQUIRES: freestanding
66

7+
// rdar://101938326
8+
// UNSUPPORTED: freestanding
9+
710
// rdar://76038845
811
// REQUIRES: concurrency_runtime
912
// UNSUPPORTED: back_deployment_runtime
@@ -97,11 +100,9 @@ func runTest(numCounters: Int, numWorkers: Int) {
97100
@available(SwiftStdlib 5.1, *)
98101
@main struct Main {
99102
static func main() {
100-
// Useful for debugging: specify counter/worker/iteration counts
101-
let args = CommandLine.arguments
102-
let numCounters = args.count >= 2 ? Int(args[1])! : 10
103-
iterations = args.count >= 4 ? Int(args[3])! : 1000
104-
let workers = args.count >= 3 ? Int(args[2])! : 100
103+
let numCounters = 10
104+
iterations = 1000
105+
let workers = 100
105106
print("counters: \(counters), workers: \(workers), iterations: \(iterations)")
106107
runTest(numCounters: numCounters, numWorkers: workers)
107108
}

test/Concurrency/Runtime/async_initializer.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// UNSUPPORTED: freestanding
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime
@@ -137,7 +138,7 @@ struct PrecariousStruct {
137138
]
138139

139140
for p in people {
140-
print(p.name)
141+
print("\(p.name)")
141142
}
142143

143144
// ----

test/Concurrency/Runtime/async_let_fibonacci.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// UNSUPPORTED: freestanding
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime
@@ -42,7 +43,7 @@ func asyncFib(_ n: Int) async -> Int {
4243
func runFibonacci(_ n: Int) async {
4344
let result = await asyncFib(n)
4445

45-
print()
46+
print("")
4647
print("Async fib = \(result), sequential fib = \(fib(n))")
4748
assert(result == fib(n))
4849
}

test/Concurrency/Runtime/async_let_throws.swift

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

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// REQUIRES: reflection
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/async_task_detach.swift

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

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// REQUIRES: reflection
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/async_task_handle_cancellation.swift

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

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// UNSUPPORTED: freestanding
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/async_task_locals_spawn_let.swift

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

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// REQUIRES: reflection
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/async_task_locals_synchronous_bind.swift

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

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
5+
// REQUIRES: reflection
56

67
// rdar://76038845
78
// REQUIRES: concurrency_runtime

0 commit comments

Comments
 (0)