Skip to content

Tests: Convert StaticBinaryLibrary Test to Swift Testing #8685

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

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

Conversation

bkhouri
Copy link
Contributor

@bkhouri bkhouri commented May 16, 2025

When SwiftPM executes tests using the native build system, the bundle path was failing on MacOS as the Bundle.allBundles did not contain the .xctest bundle.

If we fail to find the .xctest bundle, we inspect the command line argument for the --test-bundle-path argument and construct the macOS bundle root based on the argument value.

In addition, convert the StaticBinaryLibraryTests to Swift Testing to validate the logic works.

When SwiftPM exeuctes tests using the native build system, the bundle
path was failing on MacOS as the `Bundle.allBundles` did not contain the
`.xctest` bundle.

If we fail to find the .xctest bundle, we inspect the command line
argument for the `--test-bundle-path` argument and contruct the macOS
bundle root based on the argument value.

In addition, convert the StaticBinaryLibraryTests to Swift Testing to
validate the logic works.
""")
}
} when: {
ProcessInfo.hostOperatingSystem == .windows
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: given the whole test has issue(s) on Windows, isn't using the .disabled(if: ProcessInfo.hostOperatingSystem == .windows) trait more idiomatic here? Or just running the test on Windows provides some value?

Copy link
Contributor Author

@bkhouri bkhouri May 16, 2025

Choose a reason for hiding this comment

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

When the issue is fixed on Windows, this will hopefully give us signal to fix the test, by removing the withKnownIssue :)

@bkhouri
Copy link
Contributor Author

bkhouri commented May 16, 2025

@swift-ci test

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.

3 participants