From aee4d1a38c5c90bbc4a23fb71558396c5f792a6f Mon Sep 17 00:00:00 2001 From: Dave Inglis Date: Mon, 17 Nov 2025 08:56:02 -0500 Subject: [PATCH] Mark purgeCacheWithoutPackage withKnowIssue for AL2 - this test seems to cause a crash in libcrypto rdar://134238535 --- Tests/CommandsTests/PackageCommandTests.swift | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/Tests/CommandsTests/PackageCommandTests.swift b/Tests/CommandsTests/PackageCommandTests.swift index 317a570b41d..c0b9481f621 100644 --- a/Tests/CommandsTests/PackageCommandTests.swift +++ b/Tests/CommandsTests/PackageCommandTests.swift @@ -3069,22 +3069,28 @@ struct PackageCommandTests { func purgeCacheWithoutPackage( data: BuildData, ) async throws { - // Create a temporary directory without Package.swift - try await fixture(name: "Miscellaneous") { fixturePath in - let tempDir = fixturePath.appending("empty-dir-for-purge-test") - try localFileSystem.createDirectory(tempDir, recursive: true) - - // Use a unique temporary cache directory to avoid conflicts with parallel tests - try await withTemporaryDirectory(removeTreeOnDeinit: true) { cacheDir in - let result = try await executeSwiftPackage( - tempDir, - configuration: data.config, - extraArgs: ["purge-cache", "--cache-path", cacheDir.pathString], - buildSystem: data.buildSystem - ) + try await withKnownIssue( + isIntermittent: ProcessInfo.isHostAmazonLinux2() //rdar://134238535 + ) { + // Create a temporary directory without Package.swift + try await fixture(name: "Miscellaneous") { fixturePath in + let tempDir = fixturePath.appending("empty-dir-for-purge-test") + try localFileSystem.createDirectory(tempDir, recursive: true) + + // Use a unique temporary cache directory to avoid conflicts with parallel tests + try await withTemporaryDirectory(removeTreeOnDeinit: true) { cacheDir in + let result = try await executeSwiftPackage( + tempDir, + configuration: data.config, + extraArgs: ["purge-cache", "--cache-path", cacheDir.pathString], + buildSystem: data.buildSystem + ) - #expect(!result.stderr.contains("Could not find Package.swift")) + #expect(!result.stderr.contains("Could not find Package.swift")) + } } + } when: { + ProcessInfo.isHostAmazonLinux2() } }