|
17 | 17 | <GitVersionMsBuildTargets>$(RootDir)/packages/GitVersion.MsBuild/build/GitVersion.MsBuild.targets</GitVersionMsBuildTargets> |
18 | 18 | <SILBuildTasksDLL>$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll</SILBuildTasksDLL> |
19 | 19 | <SILReleaseTasksProps>$(RootDir)/packages/SIL.ReleaseTasks/build/SIL.ReleaseTasks.props</SILReleaseTasksProps> |
20 | | - <NUnitToolsDir>$(RootDir)/packages/NUnit.ConsoleRunner/tools</NUnitToolsDir> |
21 | | - <NUnitConsoleRunner>$(NUnitToolsDir)/nunit3-console.exe</NUnitConsoleRunner> |
22 | | - <BuildDependencyTasksDLL>$(RootDir)/packages/BuildDependencyTasks/BuildDependencyTasks.dll</BuildDependencyTasksDLL> |
23 | 20 | <RestartBuild Condition="!Exists('$(GitVersionMsBuildProps)') Or !Exists('$(GitVersionMsBuildTargets)') Or !Exists('$(SILBuildTasksDLL)') Or !Exists('$(SILReleaseTasksProps)') Or !Exists('$(NUnitConsoleRunner)') Or !Exists('$(BuildDependencyTasksDLL)')">true</RestartBuild> |
24 | 21 | <RestartBuild Condition="Exists('$(GitVersionMsBuildProps)') And Exists('$(GitVersionMsBuildTargets)') And Exists('$(SILBuildTasksDLL)') And Exists('$(SILReleaseTasksProps)') And Exists('$(NUnitConsoleRunner)') And Exists('$(BuildDependencyTasksDLL)')">false</RestartBuild> |
25 | 22 | <IgnoreGitVersionTask Condition="'$(IgnoreGitVersionTask)' == ''">false</IgnoreGitVersionTask> |
|
44 | 41 | <UsingTask TaskName="Split" AssemblyFile="$(SILBuildTasksDLL)" Condition="Exists('$(SILBuildTasksDLL)')"/> |
45 | 42 | <UsingTask TaskName="SIL.BuildTasks.FileUpdate" AssemblyFile="$(SILBuildTasksDLL)" Condition="Exists('$(SILBuildTasksDLL)')"/> |
46 | 43 | <UsingTask TaskName="MakeWixForDirTree" AssemblyFile="$(SILBuildTasksDLL)" Condition="Exists('$(SILBuildTasksDLL)') And '$(OS)'=='Windows_NT'"/> |
47 | | - <UsingTask TaskName="NUnit3" |
48 | | - AssemblyFile="$(SILBuildTasksDLL)" |
49 | | - Condition="Exists('$(SILBuildTasksDLL)')" /> |
50 | 44 |
|
51 | 45 | <!-- a few do-nothing targets to get rid of some warnings from GitVersion.MsBuild.targets --> |
52 | 46 | <Target Name="GetAssemblyVersion"/> |
|
203 | 197 |
|
204 | 198 | <Target Name="TestOnly"> |
205 | 199 | <ItemGroup> |
206 | | - <TestAssemblies Include="$(RootDir)/output/$(Configuration)/$(TargetFramework)/*Tests.dll" /> |
| 200 | + <!-- Include test assemblies and exclude unwanted ones --> |
| 201 | + <TestAssemblies Include="$(RootDir)/output/$(Configuration)/$(TargetFramework)/*Tests.dll" |
| 202 | + Exclude="**/SIL.LCModel.Utils.Tests.dll" /> |
207 | 203 | </ItemGroup> |
208 | 204 |
|
209 | | - <NUnit3 Assemblies="@(TestAssemblies)" |
210 | | - ToolPath="$(NUnitToolsDir)" |
211 | | - TestInNewThread="false" |
212 | | - ExcludeCategory="$(ExtraExcludeCategories)" |
213 | | - WorkingDirectory="$(RootDir)/output/$(Configuration)/$(TargetFramework)" |
214 | | - Process="single" |
215 | | - Verbose="true" |
216 | | - UseNUnit3Xml="false" |
217 | | - OutputXmlFile="$(RootDir)/output/$(Configuration)/$(TargetFramework)/TestResults.xml" |
218 | | - TeamCity="$(TeamCity)"/> |
| 205 | + <!-- Loop over each TestAssembly and execute dotnet test --> |
| 206 | + <Exec Command="dotnet test --no-build --verbosity detailed --logger "trx;LogFileName=%(TestAssemblies.Filename)TestResults.trx" --filter "TestCategory!=$(ExtraExcludeCategories)" "%(TestAssemblies.FullPath)"" |
| 207 | + Condition="Exists('%(TestAssemblies.FullPath)')" /> |
219 | 208 | </Target> |
220 | 209 |
|
221 | 210 | <Target Name="Pack" DependsOnTargets="RestorePackages"> |
|
0 commit comments