Skip to content

Convert FileManager and URL tests to swift-testing #1351

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
merged 5 commits into from
Jun 13, 2025

Conversation

jmschonfeld
Copy link
Contributor

This updates the FileManager and URL tests to swift-testing, based on the patch in #908 but updating to accommodate the latest tests. Additionally, this patch takes a different approach to serialization. Rather than creating a parent Suite for all tests that change the CWD, it instead defines a GlobalActor to represent the process' CWD. All tests that use the helper functionality to change the CWD await the test on this global actor which ensures that each block that requires a specific, consistent CWD will never run in parallel to another such block so that the CWD is globally serialized amongst any test that uses the helper automatically.

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@jrflat jrflat left a comment

Choose a reason for hiding this comment

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

This is awesome thanks for doing this! Left a small nit on test name consistency but otherwise the URL tests LGTM!

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld jmschonfeld merged commit 5af94ab into swiftlang:main Jun 13, 2025
15 checks passed
@jmschonfeld jmschonfeld deleted the swift-testing-fm branch June 13, 2025 20:24
chloe-yeo pushed a commit to chloe-yeo/swift-foundation that referenced this pull request Jun 16, 2025
* Convert FileManager and URL tests to swift-testing

* Fix Linux/Windows build failures

* Fix Windows build failures

* Remove URL prefix from other test functions

* Fix Windows build failures
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