Skip to content

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
@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.

4 participants