From 08b7277820794662af0f68b55c8a04f53b8e25d5 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Wed, 1 Oct 2025 15:45:53 -0700 Subject: [PATCH] [TEST-ONLY] Disable explicitModulesEnvironment() test Test sets global environment that interferes other tests that are running at the same time. Bug tracked: https://github.com/swiftlang/swift-build/issues/835 Also drop the flaky tests label in Xcode cloud for compilation caching tests that are likely all related the change of the environment. --- Tests/SWBBuildSystemTests/ClangCompilationCachingTests.swift | 2 +- Tests/SWBBuildSystemTests/ClangExplicitModulesTests.swift | 3 ++- Tests/SWBBuildSystemTests/ClangModuleVerifierTests.swift | 3 +-- Tests/SWBBuildSystemTests/SwiftCompilationCachingTests.swift | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Tests/SWBBuildSystemTests/ClangCompilationCachingTests.swift b/Tests/SWBBuildSystemTests/ClangCompilationCachingTests.swift index e7dd6681..c8aca8f5 100644 --- a/Tests/SWBBuildSystemTests/ClangCompilationCachingTests.swift +++ b/Tests/SWBBuildSystemTests/ClangCompilationCachingTests.swift @@ -19,7 +19,7 @@ import SWBTestSupport import SWBUtil @Suite(.skipHostOS(.windows, "Windows platform has no CAS support yet"), - .requireDependencyScannerPlusCaching, .skipInXcodeCloud("flaky tests"), .requireXcode26()) + .requireDependencyScannerPlusCaching, .requireXcode26()) fileprivate struct ClangCompilationCachingTests: CoreBasedTests { let canUseCASPlugin: Bool let canUseCASPruning: Bool diff --git a/Tests/SWBBuildSystemTests/ClangExplicitModulesTests.swift b/Tests/SWBBuildSystemTests/ClangExplicitModulesTests.swift index 4cca89f0..8127028b 100644 --- a/Tests/SWBBuildSystemTests/ClangExplicitModulesTests.swift +++ b/Tests/SWBBuildSystemTests/ClangExplicitModulesTests.swift @@ -373,7 +373,8 @@ fileprivate struct ClangExplicitModulesTests: CoreBasedTests { } } - @Test(.requireSDKs(.macOS)) + @Test(.requireSDKs(.macOS), .disabled("setting global environment interferes concurrent tests"), + .bug("https://github.com/swiftlang/swift-build/issues/835")) func explicitModulesEnvironment() async throws { try await withTemporaryDirectory { tmpDirPath in let testWorkspace = TestWorkspace( diff --git a/Tests/SWBBuildSystemTests/ClangModuleVerifierTests.swift b/Tests/SWBBuildSystemTests/ClangModuleVerifierTests.swift index 632dbbf1..c66338cc 100644 --- a/Tests/SWBBuildSystemTests/ClangModuleVerifierTests.swift +++ b/Tests/SWBBuildSystemTests/ClangModuleVerifierTests.swift @@ -191,8 +191,7 @@ fileprivate struct ClangModuleVerifierTests: CoreBasedTests { } } - @Test(.requireSDKs(.macOS), .requireClangFeatures(.wSystemHeadersInModule), .requireDependencyScannerPlusCaching, - .skipInXcodeCloud("flaky tests"), .requireXcode26()) + @Test(.requireSDKs(.macOS), .requireClangFeatures(.wSystemHeadersInModule), .requireDependencyScannerPlusCaching, .requireXcode26()) func cachedBuild() async throws { try await withTemporaryDirectory { (tmpDirPath: Path) in let archs = ["arm64", "x86_64"] diff --git a/Tests/SWBBuildSystemTests/SwiftCompilationCachingTests.swift b/Tests/SWBBuildSystemTests/SwiftCompilationCachingTests.swift index 5549e4d8..c254039a 100644 --- a/Tests/SWBBuildSystemTests/SwiftCompilationCachingTests.swift +++ b/Tests/SWBBuildSystemTests/SwiftCompilationCachingTests.swift @@ -19,8 +19,7 @@ import SWBUtil import SWBTaskExecution import SWBProtocol -@Suite(.requireSwiftFeatures(.compilationCaching), - .skipInXcodeCloud("flaky tests"), .requireXcode26()) +@Suite(.requireSwiftFeatures(.compilationCaching), .requireXcode26()) fileprivate struct SwiftCompilationCachingTests: CoreBasedTests { @Test(.requireSDKs(.iOS)) func swiftCachingSimple() async throws {