Skip to content
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

[6.0][PackageModel] UserToolchain: Add -F when building with CommandLineTools #8035

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Oct 11, 2024

Properly handle swift-testing installations in CommandLineTools.

Resolves rdar://136424541.
@bnbarham bnbarham requested a review from a team as a code owner October 11, 2024 16:58
@bnbarham bnbarham changed the title [PackageModel] UserToolchain: Add -F when building with CommandLineTools [6.0][PackageModel] UserToolchain: Add -F when building with CommandLineTools Oct 11, 2024
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test

This PR checks if XCTest is available before invoking XCTest-based tests
on Darwin. There are three possible outcomes:

1. If XCTest is available, we will run XCTest-based tests (as we have
historically.)
2. If XCTest is not available and the user explicitly passed
`--enable-xctest`, we will attempt to run XCTest-based tests, but in
general this code path will continue to fail as `swift test` has
historically done when XCTest is not available.
3. If XCTest is not available and the user did not pass
`--enable-xctest`, we skip running any XCTest logic.

On Linux/Windows/etc., XCTest is always present via
swift-corelibs-xctest and so this change has no practical effect there.
On Darwin, XCTest may be missing if the user has installed the Xcode
Command Line Tools, but not the full Xcode IDE. XCTest is not included
with the Xcode Command Line Tools package.

The purpose of this change is to allow running `swift test` when XCTest
is unavailable but Swift Testing _is_ available.
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@grynspan grynspan added the swift test Changes impacting `swift test` tool label Oct 15, 2024
@bnbarham bnbarham merged commit 00095ed into swiftlang:release/6.0 Oct 15, 2024
5 checks passed
@bnbarham bnbarham deleted the cherry-cltools branch October 15, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift test Changes impacting `swift test` tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants