MQ: Audit uses of `ConditionalFact`/`ConditionalTheory`
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
We have lots of historical usage of `ConditionalFact`/`ConditionalTheory` in the code base that restricts tests to run only on Desktop, only on CoreCLR, or some other subset. Most of these tests can actually be run on all platforms now: what they need to do instead is condition whether the newly-compiled binaries are actually run, by using `ExecutionConditionUtil` to set `expectedOutput` to `null` when not running on the platform that they are targeting. We should audit all of our uses of these attributes and remove most of them to ensure that we're really testing scenarios on all platforms.
Some things that have been looked at:
* https://github.com/dotnet/roslyn/blob/f2e3e524ad953acd92cf975257f4812ad98a6c05/src/Compilers/Test/Utilities/CSharp/CSharpTestBase.cs#L2847-L2863
* This helper is broken and needs to be rewritten, and have the tests that depend on it audited for what they should be testing. It should not be looking at `ExecutionConditionUtil` at all, it should be using the supplied `TargetFramework` to determine what to create.
* `CollectionExpressionTests.CollectionBuilder_02B`
* Calls the above helper, and should be run on all platforms.
Contributor guide
Assessment
This issue has not been assessed yet.