Skip to content
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

Cleanup PlatformSpecific/SkipOnMono attributes that skip a platform #50907

Merged
merged 8 commits into from
Apr 9, 2021

Conversation

akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Apr 8, 2021

We have a bunch of test assemblies that don't make sense on some platforms, e.g. Browser.
Right now we're skipping them via [SkipOnMono("reason", TestPlatforms.Browser)] but there's nothing that inherently ties this to Mono other than the current implementation.

The more generic SkipOnPlatform attribute can be used instead.
We can also use it in places where we do [PlatformSpecific(~TestPlatforms....)] to avoid the double inversion.

@ghost
Copy link

ghost commented Apr 8, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

We have a bunch of test assemblies that don't make sense on some platforms, e.g. Browser.
Right now we're skipping them via [SkipOnMono("reason", TestPlatforms.Browser)] but there's nothing that inherently ties this to Mono other than the current implementation.

Using the more generic SkipOnPlatform attribute can be used instead.
We can also use it in places where we do [PlatformSpecific(~TestPlatforms....)] to avoid the double inversion.

Author: akoeplinger
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@akoeplinger akoeplinger marked this pull request as ready for review April 8, 2021 17:01
@@ -68,6 +68,21 @@ This attribute returns the 'failing' category, which is disabled by default.
```
Use this attribute over test methods to skip failing tests only on the specific platforms and the specific target frameworks.

#### SkipOnPlatformAttribute
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding the docs 🎉

@safern
Copy link
Member

safern commented Apr 8, 2021

Should we also update eng/Version.Details.xml so that darc knows which version we depend on?

What about assemblies using IgnoreForCi?

@akoeplinger
Copy link
Member Author

Should we also update eng/Version.Details.xml so that darc knows which version we depend on?

#50901 was just merged so I can take that out again now.

What about assemblies using IgnoreForCi?

What about them? The <IgnoreForCI> property is used so we don't send tests to helix that will end up executing 0 tests which is wasting resources, it's kinda orthogonal except that if we have an assembly-level SkipOnPlatform then we should have a corresponding IgnoreForCI on that platform in the csproj.

@safern
Copy link
Member

safern commented Apr 8, 2021

What about them? The property is used so we don't send tests to helix that will end up executing 0 tests which is wasting resources, it's kinda orthogonal except that if we have an assembly-level SkipOnPlatform then we should have a corresponding IgnoreForCI on that platform in the csproj.

Right, but what I meant was, do we have any IgnoreForCI that we should add an attribute to the assembly so that locally they don't run?

@akoeplinger
Copy link
Member Author

@safern thanks, I see what you mean now. I checked and we don't have any cases like that, but I found a few of the reverse case where we'd have [assembly: SkipOnPlatform()] but no IgnoreForCI in the csproj.

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

Do we have any docs

EDIT: I accidentally included this comment 😄

@akoeplinger akoeplinger merged commit bc9f00c into dotnet:main Apr 9, 2021
@akoeplinger akoeplinger deleted the cleanup-platform-skips branch April 9, 2021 11:20
Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

This looks great. Thank you

@ghost ghost locked as resolved and limited conversation to collaborators May 9, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants