File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import ToolchainRegistry
2828import XCTest
2929
3030import struct TSCBasic. AbsolutePath
31+ import var TSCBasic. localFileSystem
3132import class TSCBasic. Process
3233import 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 {
You can’t perform that action at this time.
0 commit comments