Skip to content

Disable taskgroup test on freestanding; they're not supported #66181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions test/Concurrency/Runtime/async_taskgroup_dontLeakTasks.swift
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -parse-as-library) | %FileCheck %s
// TODO: move to target-run-simple-leaks-swift once CI is using at least Xcode 14.3

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

// REQUIRES: executable_test
// REQUIRES: concurrency

// REQUIRES: concurrency_runtime
// UNSUPPORTED: back_deployment_runtime

import Darwin

final class Something {
let int: Int
init(int: Int) {
self.int = int
}

deinit {
print("deinit, Something, int: \(int)")
print("deinit, Something, int: \(self.int)")
}
}

func test_taskGroup_next() async {
let tasks = 5
_ = await withTaskGroup(of: Something.self, returning: Int.self) { group in
for n in 0..<tasks {
group.spawn {
group.addTask {
Something(int: n)
}
}
Expand Down