|
1 | 1 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build;Pack"> |
2 | 2 | <PropertyGroup> |
3 | | - <RootDir Condition="'$(teamcity_build_checkoutDir)' == '' And '$(RootDir)'==''">$(MSBuildProjectDirectory)/..</RootDir> |
4 | | - <RootDir Condition="'$(teamcity_build_checkoutDir)' != ''">$(teamcity_build_checkoutDir)</RootDir> |
| 3 | + <RootDir>$(MSBuildProjectDirectory)/..</RootDir> |
5 | 4 | <Configuration Condition="'$(Configuration)'==''">Debug</Configuration> |
6 | 5 | <Platform>Any CPU</Platform> |
7 | 6 | <Solution>FLExBridge.sln</Solution> |
|
10 | 9 | <BUILD_VCS_NUMBER Condition="'$(BUILD_VCS_NUMBER)' == ''">0</BUILD_VCS_NUMBER> |
11 | 10 | <BUILD_NUMBER Condition="'$(BUILD_NUMBER)' == ''">0</BUILD_NUMBER> |
12 | 11 | <ExtraExcludeCategories Condition="'$(OS)'!='Windows_NT'">KnownMonoIssue,UnknownMonoIssue</ExtraExcludeCategories> |
13 | | - <ExtraExcludeCategories Condition="'$(teamcity_version)' != ''">SkipOnTeamCity,$(ExtraExcludeCategories)</ExtraExcludeCategories> |
| 12 | + <ExtraExcludeCategories Condition="'$(GITHUB_ACTIONS)' != ''">SkipOnCI,$(ExtraExcludeCategories)</ExtraExcludeCategories> |
14 | 13 | <Release Condition="'$(Release)' == ''">true</Release> |
15 | 14 | <PalasoVer4LinuxGecko Condition="'$(OS)'!='Windows_NT'">10.0.0-beta0081</PalasoVer4LinuxGecko> |
16 | 15 | <GitVersionMsBuildProps>$(RootDir)/packages/GitVersion.MsBuild/build/GitVersion.MsBuild.props</GitVersionMsBuildProps> |
17 | 16 | <GitVersionMsBuildTargets>$(RootDir)/packages/GitVersion.MsBuild/build/GitVersion.MsBuild.targets</GitVersionMsBuildTargets> |
18 | 17 | <SILBuildTasksDLL>$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll</SILBuildTasksDLL> |
19 | 18 | <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 | 19 | <RestartBuild Condition="!Exists('$(GitVersionMsBuildProps)') Or !Exists('$(GitVersionMsBuildTargets)') Or !Exists('$(SILBuildTasksDLL)') Or !Exists('$(SILReleaseTasksProps)') Or !Exists('$(NUnitConsoleRunner)') Or !Exists('$(BuildDependencyTasksDLL)')">true</RestartBuild> |
24 | 20 | <RestartBuild Condition="Exists('$(GitVersionMsBuildProps)') And Exists('$(GitVersionMsBuildTargets)') And Exists('$(SILBuildTasksDLL)') And Exists('$(SILReleaseTasksProps)') And Exists('$(NUnitConsoleRunner)') And Exists('$(BuildDependencyTasksDLL)')">false</RestartBuild> |
25 | 21 | <IgnoreGitVersionTask Condition="'$(IgnoreGitVersionTask)' == ''">false</IgnoreGitVersionTask> |
26 | 22 | <MSBuildTasksTargets>$(RootDir)/packages/MSBuildTasks.1.5.0.235/tools/MSBuild.Community.Tasks.Targets</MSBuildTasksTargets> |
27 | 23 | <GetVersion Condition="'$(GetVersion)' == ''">true</GetVersion> |
28 | 24 | <WriteVersionInfoToBuildLog Condition="'$(WriteVersionInfoToBuildLog)' == ''">true</WriteVersionInfoToBuildLog> |
29 | | - <TeamCity Condition="'$(teamcity_version)' != ''">true</TeamCity> |
30 | | - <TeamCity Condition="'$(teamcity_version)' == ''">false</TeamCity> |
31 | 25 | <!-- note this does not set the TargetFramework for the csproj files, it's just used as a variable to configure build paths--> |
32 | 26 | <TargetFramework Condition="'$(TargetFramework)' == ''">net462</TargetFramework> |
33 | 27 | </PropertyGroup> |
|
44 | 38 | <UsingTask TaskName="Split" AssemblyFile="$(SILBuildTasksDLL)" Condition="Exists('$(SILBuildTasksDLL)')"/> |
45 | 39 | <UsingTask TaskName="SIL.BuildTasks.FileUpdate" AssemblyFile="$(SILBuildTasksDLL)" Condition="Exists('$(SILBuildTasksDLL)')"/> |
46 | 40 | <UsingTask TaskName="MakeWixForDirTree" AssemblyFile="$(SILBuildTasksDLL)" Condition="Exists('$(SILBuildTasksDLL)') And '$(OS)'=='Windows_NT'"/> |
47 | | - <UsingTask TaskName="NUnit3" |
48 | | - AssemblyFile="$(SILBuildTasksDLL)" |
49 | | - Condition="Exists('$(SILBuildTasksDLL)')" /> |
50 | 41 |
|
51 | 42 | <!-- a few do-nothing targets to get rid of some warnings from GitVersion.MsBuild.targets --> |
52 | 43 | <Target Name="GetAssemblyVersion"/> |
|
203 | 194 |
|
204 | 195 | <Target Name="TestOnly"> |
205 | 196 | <ItemGroup> |
206 | | - <TestAssemblies Include="$(RootDir)/output/$(Configuration)/$(TargetFramework)/*Tests.dll" /> |
| 197 | + <!-- Include test assemblies and exclude unwanted ones --> |
| 198 | + <TestAssemblies Include="$(RootDir)/output/$(Configuration)/$(TargetFramework)/*Tests.dll" |
| 199 | + Exclude="**/SIL.LCModel.Utils.Tests.dll" /> |
207 | 200 | </ItemGroup> |
208 | 201 |
|
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)"/> |
| 202 | + <!-- Loop over each TestAssembly and execute dotnet test --> |
| 203 | + <Exec Command="dotnet test --no-build --verbosity detailed --logger "trx;LogFileName=%(TestAssemblies.Filename)TestResults.trx" --filter "TestCategory!=$(ExtraExcludeCategories)" "%(TestAssemblies.FullPath)"" |
| 204 | + Condition="Exists('%(TestAssemblies.FullPath)')" /> |
219 | 205 | </Target> |
220 | 206 |
|
221 | 207 | <Target Name="Pack" DependsOnTargets="RestorePackages"> |
|
0 commit comments