Skip to content

Temporarily switch JavaKitTests target to XCTest #64

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

Merged

Conversation

DougGregor
Copy link
Member

Command-line testing on macOS is broken for the JavaKitTests due to an interaction between the Java Virtual Machine, a helper test process for swift-testing (swiftpm-testing-helper), and some macOS security features. Work around the issue by replacing our use of swift-testing with XCTest, whose helper process doesn't seem to have this problem. Only do so for test targets that need to spin up an instance of the JVM, and keep using swift-testing everywhere we can.

This makes me very sad, but is better than the current solution of disabling these tests when running from the terminal. Once we've found a solution for the underlying issue, we'll revert this change as get back to swift-testing and its much nicer testing output.

Fixes issue #43 without disabling tests.

Command-line testing on macOS is broken for the JavaKitTests due to an
interaction between the Java Virtual Machine, a helper test process
for swift-testing (`swiftpm-testing-helper`), and some macOS security
features. Work around the issue by replacing our use of swift-testing
with XCTest, whose helper process doesn't seem to have this problem.
Only do so for test targets that need to spin up an instance of the
JVM, and keep using swift-testing everywhere we can.

This makes me very sad, but is better than the current solution of
disabling these tests when running from the terminal. Once we've found
a solution for the underlying issue, we'll revert this change as get
back to swift-testing and its much nicer testing output.

Fixes issue swiftlang#43 without disabling tests.
@DougGregor
Copy link
Member Author

Note that this reverts #62, because this is a better temporary solution (doesn't disable tests).

@DougGregor DougGregor merged commit c561af5 into swiftlang:main Oct 10, 2024
9 of 10 checks passed
@DougGregor DougGregor deleted the workaround-jdk-macos-terminal-issue branch October 10, 2024 18:11
@ktoso
Copy link
Collaborator

ktoso commented Oct 10, 2024

Huh surprising interaction! Lgtm thanks

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