Skip to content

Commit e4adb8d

Browse files
authored
Merge pull request #66181 from ktoso/fix-compilation-minimal
Disable taskgroup test on freestanding; they're not supported
2 parents 381f292 + b3f1d40 commit e4adb8d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/Concurrency/Runtime/async_taskgroup_dontLeakTasks.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -parse-as-library) | %FileCheck %s
22
// TODO: move to target-run-simple-leaks-swift once CI is using at least Xcode 14.3
33

4-
// This test uses `leaks` which is only available on apple platforms; limit it to macOS:
5-
// REQUIRES: OS=macosx
4+
// Task group addTask is not supported in freestanding mode
5+
// UNSUPPORTED: freestanding
66

77
// REQUIRES: executable_test
88
// REQUIRES: concurrency
99

1010
// REQUIRES: concurrency_runtime
1111
// UNSUPPORTED: back_deployment_runtime
1212

13-
import Darwin
14-
1513
final class Something {
1614
let int: Int
1715
init(int: Int) {
1816
self.int = int
1917
}
2018

2119
deinit {
22-
print("deinit, Something, int: \(int)")
20+
print("deinit, Something, int: \(self.int)")
2321
}
2422
}
2523

2624
func test_taskGroup_next() async {
2725
let tasks = 5
2826
_ = await withTaskGroup(of: Something.self, returning: Int.self) { group in
2927
for n in 0..<tasks {
30-
group.spawn {
28+
group.addTask {
3129
Something(int: n)
3230
}
3331
}

0 commit comments

Comments
 (0)