Skip to content

Test: Skip test on Amazon Linux 2 #8649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bkhouri
Copy link
Contributor

@bkhouri bkhouri commented May 9, 2025

This test caused a stack trace on Amazon Linux 2. Skip it for now.

This test caused a stack trace on Amazon Linux 2. Skip it for now.
@bkhouri
Copy link
Contributor Author

bkhouri commented May 9, 2025

@swift-ci test

@bkhouri bkhouri enabled auto-merge (squash) May 9, 2025 21:34
@@ -326,7 +327,12 @@ struct FilePackageSigningEntityStorageTests {
#expect(packageSigners.signers[davinci]?.origins == [.registry(URL("http://foo.com"))])
}

@Test
@Test(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you refactor this into its own trait so it's reusable?

extension Trait where Self == Testing.ConditionTrait {
    package static var skipAmazonLinux2: Self {
        disabled("Test fails on Amazon Linux 2", {
            ProcessInfo.hostOperatingSystem == .linux && (FileManager.default.contents(atPath: "/etc/system-release").map({ String(decoding: $0, as: UTF8.self) == "Amazon Linux release 2 (Karoo)\n" }) ?? false)
        })
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely thought of this, but that's not currently possible as adding an import Testing in the _InternalTestSupport target will cause other pipelines to start failing since, in the build-script, swift PM will build itself using Cmake, and then will build the projects using the artifacts that was produced with the Cmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be possible once swiftlang/swift#81401 is merged, hopefully.

@bkhouri bkhouri marked this pull request as draft May 12, 2025 17:11
auto-merge was automatically disabled May 12, 2025 17:11

Pull request was converted to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants