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] Fix hard-coded path to FoundationEssentialsTests resources #887

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 27, 2024

  • Explanation:

    The hard-coded resource directory path needs to account for the fact that sometimes tests are only build for the "host". So the changes try to find "-tool" prefixed directory first and if it exists, use it.

  • Main Branch PR: Fix hard-coded path to FoundationEssentialsTests resources #855

  • Risk: Very Low (only tests of foundation are effected).

  • Reviewed By: @jmschonfeld

  • Testing: Manual.

(cherry picked from commit d14ceaf)

SwiftPM used to incorrectly build tests for both host and target.
That has been fixed by swiftlang/swift-package-manager#7879.

The fix makes sure that if there are any direct macro dependencies
in test targets xctest bundle is only built for "host".

This means that the hard-coded resources path needs to be updated
to include "-tool" suffix.

(cherry picked from commit d14ceaf)
@xedin
Copy link
Contributor Author

xedin commented Aug 27, 2024

@swift-ci please test

@xedin xedin requested a review from jmschonfeld August 27, 2024 20:52
Copy link
Contributor

@jmschonfeld jmschonfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me to cherry-pick if this fixes the tests' incorrect assumptions. Adding @parkera as he is the review manager for this branch

@jmschonfeld jmschonfeld requested a review from parkera August 28, 2024 00:17
@xedin xedin merged commit 720a093 into release/6.0 Aug 28, 2024
3 checks passed
@xedin xedin deleted the fix-incorrect-foundation-resources-hardcode-6.0 branch August 28, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants