mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Merge pull request #2351 from bnbarham/skip-amazon-linux
Temporarily skip macro tests on Amazon Linux
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user