-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix XUnitWrapperGenerator handling of SkipOnCoreClrAttribute with no runtime test modes #123777
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
base: main
Are you sure you want to change the base?
Conversation
…runtime test modes Add check to skip tests if all RuntimeTestModes are skipped Fixes #105964
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Fixes a code-generation failure in XUnitWrapperGenerator when processing SkipOnCoreClrAttribute cases that result in no runtime-configuration/test-mode conditions, preventing invalid generated C# like if ().
Changes:
- Add a guard in
DecorateWithSkipOnCoreClrConfigurationto return an empty test set when no conditions are produced. - Avoid emitting
ConditionalTestwrappers with an empty condition expression.
src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs
Outdated
Show resolved
Hide resolved
Updated skipped test platform and configuration handling to use 'Any' instead of 0 values as the default skip rules (matches the implementation in arcade)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Add check to skip tests if all RuntimeTestModes are skipped
Fixes #105964