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
AddTarget incorrectly assumes an XCTest dependency. #7478
Labels
Comments
grynspan
added
bug
swift test
Changes impacting `swift test` tool
command-line interface
labels
Apr 22, 2024
DougGregor
added a commit
to DougGregor/swift-package-manager
that referenced
this issue
Apr 23, 2024
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 apple#7478
DougGregor
added a commit
to DougGregor/swift-package-manager
that referenced
this issue
Apr 23, 2024
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 apple#7478
DougGregor
added a commit
to DougGregor/swift-package-manager
that referenced
this issue
May 8, 2024
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 apple#7478
DougGregor
added a commit
that referenced
this issue
May 8, 2024
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 #7478
DougGregor
added a commit
to DougGregor/swift-package-manager
that referenced
this issue
May 8, 2024
…#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 apple#7478 (cherry picked from commit a37631a)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new AddTarget code should not always assume that XCTest is a dependency for a new test target. Rather, behaviour should be configured based on the
--enable-xctest
/--disable-xctest
and--enable-experimental-swift-testing
/--disable-experimental-swift-testing
flags, with XCTest on and swift-testing off by default. Compare theswift package init
command.The text was updated successfully, but these errors were encountered: