|
27 | 27 | <Target Name="FindCmdDirectories" DependsOnTargets="GetListOfTestCmds">
|
28 | 28 |
|
29 | 29 | <Error Condition="!Exists('$(XunitTestBinBase)')"
|
30 |
| - Text="$(XunitTestBinBase) does not exist. Please run buildtest.cmd from the (repo root)\tests at least once to get the tests built." /> |
| 30 | + Text="$(XunitTestBinBase) does not exist. Please run build-test.cmd from the repo root at least once to get the tests built." /> |
31 | 31 |
|
32 | 32 | <ItemGroup>
|
33 | 33 |
|
|
54 | 54 |
|
55 | 55 | </Target>
|
56 | 56 |
|
| 57 | + <!-- Target to check the test build, to see if it looks ok. We've had several cases where a change inadvertently and drastically changes |
| 58 | + the set of tests that are built, and that change is unnoticed. The most common case is for a build of the Priority 1 tests |
| 59 | + to only build the Priority 0 tests. This target is run after a test build to verify that the basic number of tests that were |
| 60 | + built is basically what was expected. When this was written, there were about 2500 Priority 0 tests and about 12270 Priority 1 |
| 61 | + tests (differing slightly based on platform). We currently check that the number of Priority 0 tests is greater than 2000 and |
| 62 | + less than 3000, and the number of Priority 1 tests is greater than 12000. |
| 63 | + --> |
| 64 | + <Target Name="CheckTestBuild" DependsOnTargets="GetListOfTestCmds"> |
| 65 | + <Error Condition="!Exists('$(XunitTestBinBase)')" |
| 66 | + Text="$(XunitTestBinBase) does not exist. Please run build-test.cmd from the repo root at least once to get the tests built." /> |
| 67 | + |
| 68 | + <PropertyGroup> |
| 69 | + <TestCount>@(AllRunnableTestPaths->Count())</TestCount> |
| 70 | + </PropertyGroup> |
| 71 | + |
| 72 | + <Message Text="Found $(TestCount) built tests"/> |
| 73 | + |
| 74 | + <Error Condition="'$(CLRTestPriorityToBuild)' == '0' and '$(TestCount)' <= 2000" Text="Unexpected test count. Expected > 2000, found $(TestCount).'" /> |
| 75 | + <Error Condition="'$(CLRTestPriorityToBuild)' == '0' and '$(TestCount)' >= 3000" Text="Unexpected test count. Expected < 3000, found $(TestCount).'" /> |
| 76 | + <Error Condition="'$(CLRTestPriorityToBuild)' == '1' and '$(TestCount)' <= 12000" Text="Unexpected test count. Expected > 12000, found $(TestCount).'" /> |
| 77 | + <Error Condition="'$(CLRTestPriorityToBuild)' != '0' and '$(CLRTestPriorityToBuild)' != '1'" Text="Unknown priority $(CLRTestPriorityToBuild)" /> |
| 78 | + </Target> |
| 79 | + |
57 | 80 | <Import Project="$(__Exclude)" Condition="'$(__Exclude)' != '' AND '$(XunitTestBinBase)' != ''" />
|
58 | 81 | <PropertyGroup>
|
59 | 82 | <HaveExcludes>False</HaveExcludes>
|
|
0 commit comments