Skip to content

Commit 98c1ed1

Browse files
committed
Temporarily skip macro tests on Amazon Linux
These are failing on the 2023 bootstrap job, skip for now to allow getting a toolchain out.
1 parent 0876b7d commit 98c1ed1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Sources/SKTestSupport/SkipUnless.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import ToolchainRegistry
2828
import XCTest
2929

3030
import struct TSCBasic.AbsolutePath
31+
import var TSCBasic.localFileSystem
3132
import class TSCBasic.Process
3233
import enum TSCBasic.ProcessEnv
3334

@@ -129,6 +130,21 @@ package actor SkipUnless {
129130
try XCTSkipUnless(Platform.current == .windows, message)
130131
}
131132

133+
package static func platformIsNotAmazonLinux(_ message: String) throws {
134+
if Platform.current != .linux {
135+
return
136+
}
137+
138+
let release: String
139+
do {
140+
release = try localFileSystem.readFileContents(AbsolutePath(validating: "/etc/system-release")).description
141+
} catch {
142+
return
143+
}
144+
145+
try XCTSkipUnless(!release.hasPrefix("Amazon"), message)
146+
}
147+
132148
package static func platformSupportsTaskPriorityElevation() throws {
133149
#if os(macOS)
134150
guard #available(macOS 14.0, *) else {
@@ -149,6 +165,7 @@ package actor SkipUnless {
149165
Platform.current != .windows,
150166
"Temporarily skipping as we need to fix these tests to use the cmake-built swift-syntax libraries on Windows."
151167
)
168+
try SkipUnless.platformIsNotAmazonLinux("https://github.com/swiftlang/sourcekit-lsp/issues/2350")
152169

153170
return try await shared.skipUnlessSupported(file: file, line: line) {
154171
do {

0 commit comments

Comments
 (0)