dotnet / arcade

Tools that provide common build infrastructure for multiple .NET Foundation projects.
MIT License
670 stars 346 forks source link

Arcade does not include xunit.runner.json file if being run with the VS Test runner #7080

Closed jmarolf closed 3 years ago

jmarolf commented 3 years ago

If a consumer of arcade sets <UseVSTestRunner>true</UseVSTestRunner> like we do here.

This causes all xunit targets to be skipped: https://github.com/dotnet/arcade/blob/6cc4c1e9e23d5e65e88a8a57216b3d91e9b3d8db/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L18-L19

as a result any configuration such as a custom xunit.runner.json are not respected. The following sections should be moved from XUnit.Runner.targets ot XUnit.targets

https://github.com/dotnet/arcade/blob/6cc4c1e9e23d5e65e88a8a57216b3d91e9b3d8db/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.Runner.targets#L2-L4

https://github.com/dotnet/arcade/blob/6cc4c1e9e23d5e65e88a8a57216b3d91e9b3d8db/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.Runner.targets#L10-L24

garath commented 3 years ago

This looks like work as part of the unification effort we want to get to, but this work is not prioritized. If you want to submit a PR in the meantime, we'd be happy to look at it.

JoeRobich commented 3 years ago

Implemented Jon's suggestions in https://github.com/dotnet/arcade/pull/7170