Merge pull request #2351 from bnbarham/skip-amazon-linux

Temporarily skip macro tests on Amazon Linux
This commit is contained in:
Ben Barham
2025-11-05 20:34:05 -08:00
committed by GitHub

View File

@@ -129,6 +129,16 @@ package actor SkipUnless {
try XCTSkipUnless(Platform.current == .windows, message)
}
package static func platformIsNotAmazonLinux(_ message: String) throws {
guard Platform.current == .linux,
let release = try? String(contentsOf: URL(filePath: "/etc/system-release"), encoding: .utf8)
else {
return
}
try XCTSkipUnless(!release.hasPrefix("Amazon"), message)
}
package static func platformSupportsTaskPriorityElevation() throws {
#if os(macOS)
guard #available(macOS 14.0, *) else {
@@ -149,6 +159,7 @@ package actor SkipUnless {
Platform.current != .windows,
"Temporarily skipping as we need to fix these tests to use the cmake-built swift-syntax libraries on Windows."
)
try SkipUnless.platformIsNotAmazonLinux("https://github.com/swiftlang/sourcekit-lsp/issues/2350")
return try await shared.skipUnlessSupported(file: file, line: line) {
do {