Skip to content

Commit fd31583

Browse files
authored
Merge pull request #38280 from compnerd/concurrent
test: enable some Concurrency tests on Windows
2 parents ad6a6e4 + 21126b4 commit fd31583

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

test/Concurrency/Runtime/async_task_handle_cancellation.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
// UNSUPPORTED: use_os_stdlib
88
// UNSUPPORTED: back_deployment_runtime
99

10-
// This test is flaky on VS2017 (unknown reasons)
11-
// UNSUPPORTED: MSVC_VER=15.0
12-
13-
// This test is failing on windows. SR-14447.
14-
//
15-
// UNSUPPORTED: OS=windows-msvc
16-
1710
@available(SwiftStdlib 5.5, *)
1811
@main struct Main {
1912
static func main() async {

test/Concurrency/Runtime/async_taskgroup_throw_recover.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// UNSUPPORTED: use_os_stdlib
88
// UNSUPPORTED: back_deployment_runtime
99

10-
// UNSUPPORTED: OS=windows-msvc
11-
1210
struct Boom: Error {}
1311
struct IgnoredBoom: Error {}
1412

test/Concurrency/Runtime/cancellation_handler.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
// rdar://76038845
66
// UNSUPPORTED: use_os_stdlib
77
// UNSUPPORTED: back_deployment_runtime
8-
// UNSUPPORTED: OS=windows-msvc
98

109
// for sleep
1110
#if canImport(Darwin)
1211
import Darwin
1312
#elseif canImport(Glibc)
1413
import Glibc
14+
#elseif os(Windows)
15+
import WinSDK
1516
#endif
1617

1718
class Canary {
@@ -30,7 +31,11 @@ if #available(SwiftStdlib 5.5, *) {
3031
}
3132
}
3233
task.cancel()
34+
#if os(Windows)
35+
Sleep(1 * 1000)
36+
#else
3337
sleep(1)
38+
#endif
3439
detach {
3540
await Task.withCancellationHandler {
3641
print("Task was cancelled!")
@@ -39,7 +44,11 @@ if #available(SwiftStdlib 5.5, *) {
3944
print("Running the operation...")
4045
}
4146
}
47+
#if os(Windows)
48+
Sleep(10 * 1000)
49+
#else
4250
sleep(10)
51+
#endif
4352
} else {
4453
// Fake prints to satisfy FileCheck.
4554
print("Canary")

test/Concurrency/Runtime/checked_continuation.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// UNSUPPORTED: use_os_stdlib
66
// UNSUPPORTED: back_deployment_runtime
77

8-
// UNSUPPORTED: OS=windows-msvc
9-
108
import _Concurrency
119
import StdlibUnittest
1210

test/Concurrency/Runtime/custom_executors.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
55

6-
// UNSUPPORTED: OS=windows-msvc
76
// UNSUPPORTED: back_deployment_runtime
87
// UNSUPPORTED: use_os_stdlib
98

0 commit comments

Comments
 (0)