-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Don't run net4x tests with Mono on non-Windows #98767
Conversation
We'd try to use Mono to run them but most of the tests assume Windows when targetting net4x so they don't work anyway and you'd need to remember to pass the `-f net9.0` TFM filter. Instead just skip them on non-Windows platforms. Fixes dotnet#81395
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsWe'd try to use Mono to run them but most of the tests assume Windows when targetting net4x so they don't work anyway and you'd need to remember to pass the Fixes #81395
|
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.
Few questions / observations:
- This only filters .NET Framework builds out for multi-targeting projects, right? How would we achieve the same when i.e. doing a
dotnet test
on a traversal project / solution file for non multi-targeting projects? While we only have a few of those, I think we should keep parity between single and multi-targeting builds in regards to test adapter support. - Won't this break whenever the SDK or this repo adds to the
AdditionalProperties
metadata? Is there a more robust way to make this comparison? - This reminds me that the current experience is the one that customer hit as well. I would prefer if we could fix this not just for runtime but for all other repositories and our customers as well. If we decide that we only want to fix this for runtime, this would benefit from a comment pointing to a tracking issue on the vstest side.
I don't know how it works for traversal projects or solution files, does it not run the Test target on the individual projects?
I've pushed a change to make this more resilient.
For customers the existing behavior makes sense, or at least it'd be a breaking change. In dotnet/runtime we can make different assumptions. In the end this is a quick fix to stop annoying devs in this repo, we don't need to make it perfect. |
I wasn't aware that this only affects projects that use the By doing that, any consumer of that nuget package will benefit from your improvements and the approach is more efficient as we don't need to pass the to be filtered project TFM tuples into the We already check the TFM values there to not append As discussed offline, we should still file an issue on the VSTest side and link to it for the |
…ild.Tasks.TargetFramework.targets Helps with dotnet/runtime#98767
5be92bb
to
c564e27
Compare
@ViktorHofer updated with the new arcade-based filtering. Also filed a VSTest issue: microsoft/vstest#4908 |
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.
One nit, aside from that LGTM. Regarding the portable source build failure, tt might not be possible anymore to just update one dependency from a repo that offers an intermediate source build package.
Ok, I'll wait for the arcade update to flow into main. |
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
We'd try to use Mono to run them but most of the tests assume Windows when targetting net4x so they don't work anyway and you'd need to remember to pass the
-f net9.0
TFM filter. Instead just skip them on non-Windows platforms.Fixes #81395