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

test/Concurrency/Runtime/async_task_locals_wrapper.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_yield.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
// REQUIRES: concurrency_runtime
78
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/async_taskgroup_throw_recover.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_taskgroup_throw_rethrow.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/checked_continuation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
55
// REQUIRES: concurrency_runtime
6+
// REQUIRES: reflection
67
// UNSUPPORTED: back_deployment_runtime
78

89
import _Concurrency

test/Concurrency/Runtime/class_resilience.swift

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

1111
// REQUIRES: executable_test
1212
// REQUIRES: concurrency
13+
// UNSUPPORTED: freestanding
1314

1415
// rdar://76038845
1516
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/continuation_validation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// REQUIRES: concurrency_runtime
99
// UNSUPPORTED: back_deployment_runtime
1010
// UNSUPPORTED: use_os_stdlib
11+
// UNSUPPORTED: freestanding
1112

1213
import StdlibUnittest
1314

test/Concurrency/Runtime/custom_executors.swift

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

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

67
// UNSUPPORTED: back_deployment_runtime
78
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/effectful_properties.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/exclusivity.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
// REQUIRES: concurrency_runtime
78
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/exclusivity_custom_executors.swift

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

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

67
// rdar://76038845
78
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/executor_deinit2.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/protocol_resilience.swift

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

1111
// REQUIRES: executable_test
1212
// REQUIRES: concurrency
13+
// UNSUPPORTED: freestanding
1314

1415
// rdar://76038845
1516
// REQUIRES: concurrency_runtime

test/Concurrency/Runtime/task_creation.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/task_destruction.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// REQUIRES: executable_test
33
// REQUIRES: concurrency
44
// REQUIRES: concurrency_runtime
5+
// UNSUPPORTED: freestanding
56

67
// UNSUPPORTED: back_deployment_runtime
78

test/Concurrency/async_main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ func asyncFunc() async {
2020

2121
@main struct MyProgram {
2222
static func main() async throws {
23-
print(foo)
23+
print("\(foo)")
2424
foo += 1
2525
await asyncFunc()
26-
print(foo)
26+
print("\(foo)")
2727
}
2828
}
2929

test/Concurrency/async_main_throws_prints_error.swift

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

77
// REQUIRES: concurrency
88
// REQUIRES: executable_test
9+
// REQUIRES: reflection
910
// REQUIRES: OS=macosx || OS=ios
1011

1112
// rdar://76038845

test/Concurrency/throwing.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
// REQUIRES: concurrency_runtime
78
// UNSUPPORTED: back_deployment_runtime

utils/build-presets.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2410,7 +2410,7 @@ native-llvm-tools-path=%(toolchain_path)s
24102410
native-clang-tools-path=%(toolchain_path)s
24112411

24122412
build-ninja
2413-
lit-args=--filter=':: stdlib/' -v
2413+
lit-args=--filter=':: (stdlib/|Concurrency/)' -v
24142414
only-executable-test
24152415

24162416
[preset: stdlib_RD_standalone,build]

0 commit comments

Comments
 (0)