-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Skip methods in test-merging if they use the named argument 'Skip' for the Fact attributes #85495
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
Conversation
Tagging subscribers to this area: @hoyosjs Issue Detailsnull
|
ce729a4
to
802d0bf
Compare
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
802d0bf
to
45f7e6c
Compare
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
@dotnet/jit-contrib this is ready |
@jkoritzinsky I was wondering about the intentions for the attribute system. Is the goal (subject to prioritizing the work of course) full compatibility with xunit, or doing that within some context of dotnet/runtime-specific goals? For example, was this intentionally left off because something like ActiveIssueAttribute should be used instead? Do we want to be propagating "skips" up to DevOps for reporting? And so on. Thanks! |
switch (attr.AttributeClass?.ToDisplayString()) | ||
{ | ||
case "Xunit.ConditionalFactAttribute": | ||
filterAttributes.Add(attr); | ||
factAttribute = true; | ||
if (!hasSkip) |
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.
This seems like a prime example for the newer C# switch syntax
case "Xunit.ConditionalFactAttribute" when !hasSkip:
though perhaps the right solution is to put all of these into filterAttributes
so that filtering can then drop them like other filters do (and skip reporting, etc., would have a single place to be implemented).
The goal is to support whatever subset of xunit + Microsoft.DotNet.XUnitExtensions that we use in the src/tests tree or used similar features of in the legacy test system. There have been talks about building more of a true xunit replacement that's all source-generated, but this system is not meant to do that (though it might be a base for it in the future). As we start to use more features of XUnit in these tests, I'm fully onboard with adding capabilities to the generator. I didn't include it initially as we rarely use
I don't think we emit code to record unconditional skips today, but that's a good idea. We should probably do that for reporting purposes. |
We really need to expand the documentation on how to disable tests -- https://github.com/dotnet/runtime/blob/main/docs/workflow/ci/disabling-tests.md -- to include examples of all the ways you can/should disable coreclr tests. There is a link there to the doc on disabling libraries tests. |
@BruceForstall there is more documentation regarding new ways to disable tests: https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/filtering-tests.md I think it's fair to handle the |
…mentation about FactAttribute and Skip.
No description provided.