From a8528c9cb36c6a2992d0f2fd20e8206180f5e099 Mon Sep 17 00:00:00 2001 From: Ben Barham Date: Mon, 24 Feb 2025 14:48:16 -0800 Subject: [PATCH 1/2] Fix a couple testing paths on Windows --- Sources/SKTestSupport/SwiftPMTestProject.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SKTestSupport/SwiftPMTestProject.swift b/Sources/SKTestSupport/SwiftPMTestProject.swift index cdb188666..7e1dfe961 100644 --- a/Sources/SKTestSupport/SwiftPMTestProject.swift +++ b/Sources/SKTestSupport/SwiftPMTestProject.swift @@ -169,8 +169,8 @@ package class SwiftPMTestProject: MultiFileTestProject { .macro( name: "MyMacros", swiftSettings: [.unsafeFlags([ - "-I", "\(moduleSearchPath)", - "-Xcc", "-fmodule-map-file=\(try swiftSyntaxCShimsModulemap.filePath)" + "-I", #"\(moduleSearchPath)"#, + "-Xcc", #"-fmodule-map-file=\(try swiftSyntaxCShimsModulemap.filePath)"# ])], linkerSettings: [ .unsafeFlags([ From b5a96fae25c462b841b588906d54e13adcba6f83 Mon Sep 17 00:00:00 2001 From: Ben Barham Date: Tue, 25 Feb 2025 10:56:26 -0800 Subject: [PATCH 2/2] Temporarily skip macro tests on Windows We re-use the swift-syntax libs from the real build to avoid re-building it in these tests, but it currently only handles the SwiftPM build and not Windows. Temporarily continue skipping these on Windows to unblock CI. --- Sources/SKTestSupport/SkipUnless.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/SKTestSupport/SkipUnless.swift b/Sources/SKTestSupport/SkipUnless.swift index 99677fa1d..ae2fcfaee 100644 --- a/Sources/SKTestSupport/SkipUnless.swift +++ b/Sources/SKTestSupport/SkipUnless.swift @@ -140,6 +140,11 @@ package actor SkipUnless { file: StaticString = #filePath, line: UInt = #line ) async throws { + try XCTSkipUnless( + Platform.current != .windows, + "Temporarily skipping as we need to fix these tests to use the cmake-built swift-syntax libraries on Windows." + ) + return try await shared.skipUnlessSupported(file: file, line: line) { do { let project = try await SwiftPMTestProject(