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] Properly handle swift-testing installations in toolchain/SDK #7856

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 5, 2024

  • Explanation:

    On macOS SwiftPM should prefer swift-testing installed into a custom toolchain when used. On Windows we need special logic to discover swift-testing location.

    • Add special swift compiler "extra" flags to favor swift-testing installed in a toolchain.
    • Inject -I, -L on Windows that point to where swift-testing is installed in SDKROOT.
    • Inject a path to testing on PATH environment variable on Windows to make sure that the library is always discoverable.
  • Main Branch PR: [PackageModel] Support swift-testing installed in a toolchain #7840

  • Resolves: rdar://132828246

  • Risk: Medium (Although changes are only viable with toolchains have certain directories in them and test we could do for testing was manual validation).

  • Reviewed By: @MaxDesiatov @rintaro

  • Testing: Existing tests and manual validation using new toolchain (which is currently in development) on Windows and a custom toolchain plus CommandLine tools on macOS.

@xedin xedin added windows build system Changes to interactions with build systems swift test Changes impacting `swift test` tool macros Support for macros labels Aug 5, 2024
@xedin xedin requested a review from a team as a code owner August 5, 2024 21:05
@xedin
Copy link
Contributor Author

xedin commented Aug 5, 2024

@swift-ci please test

@xedin xedin force-pushed the swift-testing-in-toolchain-6.0 branch from a161ff6 to f6c3f8e Compare August 5, 2024 23:40
@xedin
Copy link
Contributor Author

xedin commented Aug 5, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 5, 2024

@swift-ci please test Windows platform

@xedin xedin force-pushed the swift-testing-in-toolchain-6.0 branch from f6c3f8e to 09e0db5 Compare August 6, 2024 00:57
@xedin
Copy link
Contributor Author

xedin commented Aug 6, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 6, 2024

@swift-ci please test Windows platform

On macOS SwiftPM should prefer swift-testing installed into a custom toolchain when used.
On Windows we need special logic to discover swift-testing location.

- Add special swift compiler "extra" flags to favor swift-testing installed in a toolchain.
- Inject `-I`, `-L` on Windows that point to where swift-testing is installed in SDKROOT.
- Inject a path to testing on `PATH` environment variable on Windows to make sure that the library is always discoverable.

Resolves: rdar://132828246
@xedin xedin force-pushed the swift-testing-in-toolchain-6.0 branch from 09e0db5 to e4bf1ac Compare August 6, 2024 21:45
@xedin
Copy link
Contributor Author

xedin commented Aug 6, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 6, 2024

@swift-ci please test Windows platform

@xedin
Copy link
Contributor Author

xedin commented Aug 7, 2024

@swift-ci please test Linux platform

@xedin
Copy link
Contributor Author

xedin commented Aug 12, 2024

@swift-ci please test

@xedin xedin merged commit 708f50b into swiftlang:release/6.0 Aug 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Changes to interactions with build systems macros Support for macros swift test Changes impacting `swift test` tool windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants