Skip to content

Commit 39926a8

Browse files
authored
Merge pull request #336 from apple/chefski/backport-async-support-to-5.5-windows-fix
Backport async support to 5.5, PR #2
2 parents ee9fe6b + f9722e6 commit 39926a8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Tests/Functional/Asynchronous/Use/main.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// RUN: %{xctest_checker} %t %s
44
// REQUIRES: concurrency_runtime
55

6+
// UNSUPPORTED: OS=windows
7+
68
#if os(macOS)
79
import SwiftXCTest
810
#else
@@ -57,7 +59,7 @@ class AsyncAwaitTests: XCTestCase {
5759
override func setUp() async throws {}
5860

5961
override func tearDown() async throws {}
60-
62+
6163
// CHECK: Test Case 'AsyncAwaitTests.test_explicitFailures_withinAsyncTests_areReported' started at \d+-\d+-\d+ \d+:\d+:\d+\.\d+
6264
// CHECK: .*[/\\]Asynchronous[/\\]Use[/\\]main.swift:[[@LINE+3]]: error: AsyncAwaitTests.test_explicitFailures_withinAsyncTests_areReported : XCTAssertTrue failed -
6365
// CHECK: Test Case 'AsyncAwaitTests.test_explicitFailures_withinAsyncTests_areReported' failed \(\d+\.\d+ seconds\)

Tests/Functional/lit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ else:
7575
# We need to jump through extra hoops to link swift-corelibs-foundation.
7676
foundation_dir = _getenv('FOUNDATION_BUILT_PRODUCTS_DIR')
7777
if platform.system() == 'Windows':
78+
sdkroot = os.getenv('SDKROOT', None)
79+
if sdkroot:
80+
swift_exec.extend(['-sdk', sdkroot])
7881
swift_exec.extend(['-Xlinker', '-nodefaultlib:libcmt'])
7982
else:
8083
swift_exec.extend([
@@ -148,3 +151,5 @@ os_is_not_macOS = run_os != 'Darwin'
148151
macOS_version_is_recent_enough = parse_version(run_vers) >= parse_version('12.0')
149152
if os_is_not_macOS or macOS_version_is_recent_enough:
150153
config.available_features.add('concurrency_runtime')
154+
if run_os == 'Windows':
155+
config.available_features.add('OS=windows')

0 commit comments

Comments
 (0)