-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Detect if XCTest is installed on Darwin #7805
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
Conversation
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
compnerd
requested changes
Jul 22, 2024
Did some experimenting—I think that what I really need here is not weak-linked XCTest, but simply to detect if |
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.
bdb90fd
to
cc032ce
Compare
@swift-ci please test |
@swift-ci please test Windows |
compnerd
approved these changes
Jul 23, 2024
2 tasks
@swift-ci please test |
@swift-ci please test Windows |
@swift-ci please test Windows |
MaxDesiatov
approved these changes
Jul 26, 2024
bnbarham
pushed a commit
that referenced
this pull request
Oct 11, 2024
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
pushed a commit
to bnbarham/swift-package-manager
that referenced
this pull request
Oct 12, 2024
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
pushed a commit
that referenced
this pull request
Oct 15, 2024
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.
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.
This PR checks if XCTest is available before invoking XCTest-based tests on Darwin. There are three possible outcomes:
--enable-xctest
, we will attempt to run XCTest-based tests, but in general this code path will continue to fail asswift test
has historically done when XCTest is not available.--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.