Skip to content

Tests: Fix and re-enable @_spi_available tests #64724

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 1 commit into from
Mar 30, 2023

Conversation

tshortli
Copy link
Contributor

The main issue was that the tests specified -library-level=api in swift-frontend invocations instead of -library-level api. The former seems to have no effect and therefore expected diagnostics were not being emitted.

Additional clean up:

  • Make every test require OS=macosx for ease of local testing.
  • Avoid unnecessarily specifying target arches (this makes tests slow).
  • Add missing FileCheck invocation.
  • Add some missing test coverage.

Resolves rdar://91325474

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Thank you for the cleaning up!

The main issue was that the tests specified `-library-level=api` in
`swift-frontend` invocations instead of `-library-level api`. The former seems
to have no effect and therefore expected diagnostics were not being emitted.

Additional clean up:
- Make every test require `OS=macosx` for ease of local testing.
- Avoid unnecessarily specifying target arches (this makes tests slow).
- Add missing `FileCheck` invocation.
- Add some missing test coverage.

Resolves rdar://91325474
@tshortli tshortli force-pushed the spi-available-tests branch from 46013a5 to f4b7959 Compare March 29, 2023 21:45
@tshortli
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

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

Interesting, there's no mention of -library-level= in Options.td but maybe it's implicitly accepted and then just not handled at all afterwards. I'll have to look into it.

@tshortli tshortli merged commit 06f5a96 into swiftlang:main Mar 30, 2023
@tshortli tshortli deleted the spi-available-tests branch March 30, 2023 03:46
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