Add SkipOnCoreclr and SkipOnMono attributes#4231
Conversation
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/RuntimeStressTestModes.cs
Outdated
Show resolved
Hide resolved
|
cc: @marek-safar |
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Attributes/SkipOnMonoAttribute.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/RuntimeStressTestModes.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Attributes/SkipOnCoreClrAttribute.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Outdated
Show resolved
Hide resolved
|
What's the remaining work here? |
I'm finishing local testing (found a small couple bugs), will update and merge. |
|
@BruceForstall @jkotas @stephentoub @marek-safar can I get a review just to make sure this change meets all we need the way it is and see if you can spot any wrong assumptions? |
src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs
Show resolved
Hide resolved
|
|
||
| return assemblyConfigurationAttribute != null && | ||
| string.Equals(assemblyConfigurationAttribute.Configuration, "Checked", StringComparison.InvariantCulture); | ||
| } |
There was a problem hiding this comment.
Should we cache the answer to this and some of the other IsXx properties/methods? Seems like they could end up being invoked many times while running tests and potentially affect test execution time. It could always be done later, though, if it's found to be an issue.
There was a problem hiding this comment.
Yeah, I was thinking about that. I will explore on doing it before merging the PR.
|
Merging as it is to unblock ongoing work. Will add caching later this week. I'll open an issue for that. |
This contributes toward unifying the way we disable tests in between CoreFX/CoreCLR and Mono testing for corefx tests.
The way it works is as follows:
SkipOnCoreClrAttribute
We can use this attribute in different ways:
SkipOnMonoAttribute
We can use this attribute in different ways:
The way these attributes work, if the attribute is added and the conditions are met, we will add a trait to the member which it was added (assembly, class or method)
Category=failing. Then when calling XUnit as we already do today, we need to pass an argument,-notrait Category=failing.I'm still testing this locally but wanted to start gathering feedback on the proposal.
cc: @jkotas @BruceForstall @stephentoub @jaredpar @ViktorHofer @danmosemsft