Skip to content

[6.0] Teach swift package add-target --type test about swift-testing (#7481) #7537

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

Conversation

DougGregor
Copy link
Member

Explanation: Introduce a command-line argument --testing-library to the new add-target command to specify which test library to generate the test for. This can be 'xctest' (the prior XCTest behavior), 'swift-testing' (to use the new swift-testing library), or 'none' (for no test library at all).
Original PR: #7481
Risk: Low. Extends new functionality in a new package command.
Testing: New tests.

…lang#7481)

Introduce a command-line argument `--testing-library` to the add-target
command to specify which test library to generate the test for. This
can be 'xctest' (the prior XCTest behavior), 'swift-testing' (to use the
new swift-testing library), or 'none' (for no test library at all).

For the new swift-testing generation, also add the appropriate package
and test target dependency, along with a stub testsuite to start from.

Fixes swiftlang#7478

(cherry picked from commit a37631a)
@DougGregor
Copy link
Member Author

@swift-ci please test

@MaxDesiatov MaxDesiatov added enhancement swift test Changes impacting `swift test` tool command-line interface swift 6.0 Related to Swift 6.0 release branch labels May 8, 2024
@DougGregor DougGregor merged commit fd7dfa7 into swiftlang:release/6.0 May 8, 2024
@DougGregor DougGregor deleted the package-manifest-edit-swift-testing-6.0 branch May 8, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-line interface enhancement swift test Changes impacting `swift test` tool swift 6.0 Related to Swift 6.0 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants