-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect if XCTest is installed on Darwin (#7805)
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.
- Loading branch information
Showing
3 changed files
with
34 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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