Skip to content

Commit 127a156

Browse files
[TEST-ONLY] Try renable compilation caching tests
Try again to re-enable caching tests which was marked flaky due to unstable tests on Xcode Cloud. Re-enable compilation caching tests except on Xcode Cloud.
1 parent 68603c0 commit 127a156

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Sources/SWBTestSupport/SkippedTestSupport.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ extension Trait where Self == Testing.ConditionTrait {
175175
return .skipIfEnvironmentVariableSet(key: "GITHUB_ACTIONS")
176176
}
177177

178+
package static func skipInXcodeCloud(_ comment: Comment? = nil) -> Self {
179+
return .skipIfEnvironmentVariableSet(key: "CI_XCODE_CLOUD")
180+
}
181+
178182
package static func requireClangFeatures(_ requiredFeatures: DiscoveredClangToolSpecInfo.FeatureFlag...) -> Self {
179183
enabled("Clang compiler does not support features: \(requiredFeatures)") {
180184
let features = try await ConditionTraitContext.shared.clangFeatures

Tests/SWBBuildSystemTests/ClangCompilationCachingTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import SWBTestSupport
1919
import SWBUtil
2020

2121
@Suite(.skipHostOS(.windows, "Windows platform has no CAS support yet"),
22-
.requireDependencyScannerPlusCaching,
23-
.flaky("A handful of Swift Build CAS tests fail when running the entire test suite"), .bug("rdar://146781403"))
22+
.requireDependencyScannerPlusCaching, .skipInXcodeCloud("flaky tests"))
2423
fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
2524
let canUseCASPlugin: Bool
2625
let canUseCASPruning: Bool

Tests/SWBBuildSystemTests/ClangModuleVerifierTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ fileprivate struct ClangModuleVerifierTests: CoreBasedTests {
192192
}
193193

194194
@Test(.requireSDKs(.macOS), .requireClangFeatures(.wSystemHeadersInModule), .requireDependencyScannerPlusCaching,
195-
.flaky("A handful of Swift Build CAS tests fail when running the entire test suite"), .bug("rdar://146781403"))
195+
.skipInXcodeCloud("flaky tests"))
196196
func cachedBuild() async throws {
197197
try await withTemporaryDirectory { (tmpDirPath: Path) in
198198
let archs = ["arm64", "x86_64"]

Tests/SWBBuildSystemTests/SwiftCompilationCachingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import SWBTaskExecution
2020
import SWBProtocol
2121

2222
@Suite(.requireSwiftFeatures(.compilationCaching),
23-
.flaky("A handful of Swift Build CAS tests fail when running the entire test suite"), .bug("rdar://146781403"))
23+
.skipInXcodeCloud("flaky tests"))
2424
fileprivate struct SwiftCompilationCachingTests: CoreBasedTests {
2525
@Test(.requireSDKs(.iOS))
2626
func swiftCachingSimple() async throws {

0 commit comments

Comments
 (0)