@@ -19,6 +19,7 @@ final class BasicTests: XCTestCase {
1919
2020 func testExamplePackageDealer( ) throws {
2121 try XCTSkipIf ( isSelfHosted, " These packages don't use the latest runtime library, which doesn't work with self-hosted builds. " )
22+ try skipUnlessAtLeastSwift6 ( )
2223
2324 try withTemporaryDirectory { tempDir in
2425 let packagePath = tempDir. appending ( component: " dealer " )
@@ -93,9 +94,7 @@ final class BasicTests: XCTestCase {
9394 }
9495
9596 func testSwiftPackageInitExec( ) throws {
96- #if swift(<5.5)
97- try XCTSkipIf ( true , " skipping because host compiler doesn't support '-entry-point-function-name' " )
98- #endif
97+ try skipUnlessAtLeastSwift6 ( )
9998
10099 try withTemporaryDirectory { tempDir in
101100 // Create a new package with an executable target.
@@ -122,9 +121,7 @@ final class BasicTests: XCTestCase {
122121 }
123122
124123 func testSwiftPackageInitExecTests( ) throws {
125- #if swift(<5.5)
126- try XCTSkipIf ( true , " skipping because host compiler doesn't support '-entry-point-function-name' " )
127- #endif
124+ try skipUnlessAtLeastSwift6 ( )
128125
129126 try XCTSkip ( " FIXME: swift-test invocations are timing out in Xcode and self-hosted CI " )
130127
@@ -149,6 +146,8 @@ final class BasicTests: XCTestCase {
149146 }
150147
151148 func testSwiftPackageInitLib( ) throws {
149+ try skipUnlessAtLeastSwift6 ( )
150+
152151 try withTemporaryDirectory { tempDir in
153152 // Create a new package with an executable target.
154153 let packagePath = tempDir. appending ( component: " Project " )
@@ -167,6 +166,8 @@ final class BasicTests: XCTestCase {
167166 }
168167
169168 func testSwiftPackageLibsTests( ) throws {
169+ try skipUnlessAtLeastSwift6 ( )
170+
170171 try XCTSkip ( " FIXME: swift-test invocations are timing out in Xcode and self-hosted CI " )
171172
172173 try withTemporaryDirectory { tempDir in
@@ -225,9 +226,7 @@ final class BasicTests: XCTestCase {
225226 }
226227
227228 func testSwiftRun( ) throws {
228- #if swift(<5.5)
229- try XCTSkipIf ( true , " skipping because host compiler doesn't support '-entry-point-function-name' " )
230- #endif
229+ try skipUnlessAtLeastSwift6 ( )
231230
232231 try withTemporaryDirectory { tempDir in
233232 let packagePath = tempDir. appending ( component: " secho " )
@@ -256,6 +255,8 @@ final class BasicTests: XCTestCase {
256255 }
257256
258257 func testSwiftTest( ) throws {
258+ try skipUnlessAtLeastSwift6 ( )
259+
259260 try XCTSkip ( " FIXME: swift-test invocations are timing out in Xcode and self-hosted CI " )
260261
261262 try withTemporaryDirectory { tempDir in
@@ -377,3 +378,9 @@ private extension Character {
377378 }
378379 }
379380}
381+
382+ private func skipUnlessAtLeastSwift6( ) throws {
383+ #if compiler(<6.0)
384+ try XCTSkipIf ( true , " Skipping because test requires at least Swift 6.0 " )
385+ #endif
386+ }
0 commit comments