Improve reusable TestCase and Swift Testing integration - #2
Open
kudit wants to merge 104 commits into
Open
Conversation
kudit
force-pushed
the
agent/improve-test-infrastructure
branch
from
July 26, 2026 02:08
20d8a11 to
c6c86f1
Compare
Fix test infrastructure availability
Simplified code duplication and context description.
Refactor lastPathComponent to support Windows-style paths and remove Foundation dependency.
Added guidelines for collaborative coding workflow to improve interaction with maintainers.
Added testing requirements and TODOs for release preparation.
This reverts commit d82e8c0.
fix @available where macOS 12 was paired with watchOS 8
…m/kudit/Compatibility into agent/improve-test-infrastructure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This PR modernizes Compatibility's reusable test infrastructure, debugging/threading helpers, and Xcode test integration.
Compatibility Testing LibraryandModuleTestEntryso reusableTestCases appear as named parameterized Swift Testing cases in SwiftPM and Xcode.mainso the helper itself can be called from any thread while only its closure is main-actor isolated; full-runtime WebAssembly uses real Swift concurrency for MainActor scheduling.sleep,background, anddelay; those APIs are now omitted there rather than silently providing incorrect semantics.mainremains available on full-runtime WASM but is omitted for Embedded Swift.CompatibilityTests.xctestproducts and exposing parameterized cases in the Test Navigator.Validation before merge
swift testand confirm all reusable module parameter cases pass.CompatibilityTestXcode scheme and confirm both package tests andCompatibilityUITestspass.Follow-up
After release, Device can import
CompatibilityTestingand replace its duplicated module-test adapter withModuleTestEntry.