-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Discovered during dotnet/runtime#86151
Source https://github.com/dotnet/arcade/blob/f38f6d1439ff6546a97f568f3e6bd3eea3ac8e6c/src/Microsoft.DotNet.SourceBuild/tasks/src/UsageReport/WriteUsageReports.cs#LL246C28-L246C50
In current implementation, IsTestUsageByHeuristic goes through projects build and checks if their path contains test. If any such project is found, the ValidateUsageAgainstBaseline fails the build.
The logic has a couple of short-comings, one of which is that all projects are verified after-the-fact (after the build) by simply checking their path, meaning that we cannot disable the check on a project-level and rather have to do it on the repo level (see here). An example of such project is pretest.proj in runtime (dotnet/runtime#86151 (comment)) with more potential packages / projects in the future (dotnet/runtime#86151 (comment)).
It was added for repo level pre-built detection (dotnet/arcade@c7fbbab#diff-9d8188a7b89da1c53bc1b0861431b5d9b90e3923610ddb80d2cf9d5fc91bac98) and should be removed as its not a valid check