@@ -84,6 +84,7 @@ package actor SkipUnless {
84
84
}
85
85
86
86
private func skipUnlessSupported(
87
+ allowSkippingInCI: Bool = false ,
87
88
featureName: String = #function,
88
89
file: StaticString ,
89
90
line: UInt ,
@@ -92,8 +93,8 @@ package actor SkipUnless {
92
93
let checkResult : FeatureCheckResult
93
94
if let cachedResult = checkCache [ featureName] {
94
95
checkResult = cachedResult
95
- } else if ProcessEnv . block [ " SWIFTCI_USE_LOCAL_DEPS " ] != nil {
96
- // Never skip tests in CI. Toolchain should be up-to-date
96
+ } else if ProcessEnv . block [ " SWIFTCI_USE_LOCAL_DEPS " ] != nil && !allowSkippingInCI {
97
+ // In general, don't skip tests in CI. Toolchain should be up-to-date
97
98
checkResult = . featureSupported
98
99
} else {
99
100
checkResult = try await featureCheck ( )
@@ -466,7 +467,7 @@ package actor SkipUnless {
466
467
file: StaticString = #filePath,
467
468
line: UInt = #line
468
469
) async throws {
469
- return try await shared. skipUnlessSupportedByToolchain ( swiftVersion : SwiftVersion ( 6 , 0 ) , file: file, line: line) {
470
+ return try await shared. skipUnlessSupported ( allowSkippingInCI : true , file: file, line: line) {
470
471
let swiftFrontend = try await unwrap ( ToolchainRegistry . forTesting. default? . swift) . parentDirectory
471
472
. appending ( component: " swift-frontend " )
472
473
return try await withTestScratchDir { scratchDirectory in
@@ -489,7 +490,10 @@ package actor SkipUnless {
489
490
)
490
491
try process. launch ( )
491
492
let result = try await process. waitUntilExit ( )
492
- return result. exitStatus == . terminated( code: 0 )
493
+ if result. exitStatus == . terminated( code: 0 ) {
494
+ return . featureSupported
495
+ }
496
+ return . featureUnsupported( skipMessage: " Skipping because toolchain can not compile for wasm " )
493
497
}
494
498
}
495
499
}
0 commit comments