Skip to content

test: Improve test/Misc/verify-swift-feature-testing.test-sh #79739

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 3 commits into from
Mar 4, 2025

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Mar 3, 2025

  • 8s → 2.5s.
  • Run it only on macOS.
  • Improve error messages.
  • Loosen the compiler option regex to match more legit cases.

@AnthonyLatsis AnthonyLatsis requested a review from drodriguez March 3, 2025 12:17
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

Copy link
Contributor

@drodriguez drodriguez left a comment

Choose a reason for hiding this comment

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

I think I was going for clarity with the multiple grep invocations over the same set of files, but if reducing the number of grep invocations brings the runtime to less than half, a little bit less clarity might be worth it.

I would like to know the reason for the new REQUIRES:. I work on Linux a lot, and this script can be helpful there too (and in Windows).

@AnthonyLatsis AnthonyLatsis force-pushed the blin-blinskiy branch 2 times, most recently from 19a6c59 to ccb205b Compare March 3, 2025 22:25
* The set of files that enable features and the set of files that
  require features are expected to have a very small, if any,
  difference. Don't compute and check each set separately.
* Find RUN and REQUIRES lines in a file in one go.
* Account for variable number of spaces.
* Match strings like '-enable-upcoming-feature\'. We want to complain
  about these because the script cannot get the job done when the option
  and argument are on different lines.
  The capture group will match '' in these cases.
* Place 'error: ' after file name.
* Be more clear about what's wrong and where.
@AnthonyLatsis
Copy link
Collaborator Author

Thanks for the quick review!

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis AnthonyLatsis enabled auto-merge March 4, 2025 00:58
@AnthonyLatsis AnthonyLatsis merged commit 0879412 into swiftlang:main Mar 4, 2025
3 checks passed
@AnthonyLatsis AnthonyLatsis deleted the blin-blinskiy branch March 4, 2025 03:33
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.

2 participants