Skip to content

Commit

Permalink
Improve build
Browse files Browse the repository at this point in the history
Wildcards in item groups below the root element get evaluated when
the file gets read. This change moves the itemgroup under the test
target so that we get all the test files (even the ones that don't
exist at the time the file gets read). Hopefully this will eliminate
the build failures on TC.
  • Loading branch information
ermshiperete committed Mar 3, 2015
1 parent 956ca61 commit b1b9b38
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build/Chorus.proj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<ApplicationNameLC>chorus</ApplicationNameLC>
<Configuration Condition="'$(OS)'!='Windows_NT' And '$(Configuration)'==''">DebugMono</Configuration>
<Configuration Condition="'$(OS)'=='Windows_NT' And '$(Configuration)'==''">Release</Configuration>
<ExtraExcludeCategories Condition="'$(OS)'!='Windows_NT'">KnownMonoIssue</ExtraExcludeCategories>
<ExtraExcludeCategories Condition="'$(OS)'!='Windows_NT'">;KnownMonoIssue</ExtraExcludeCategories>
<useNUnit-x86 Condition="'$(OS)'=='Windows_NT'">true</useNUnit-x86>
<useNUnit-x86 Condition="'$(OS)'!='Windows_NT'">false</useNUnit-x86>
</PropertyGroup>
Expand Down Expand Up @@ -106,28 +106,30 @@
Properties="Configuration=$(Configuration)" />
</Target>

<ItemGroup>
<TestAssemblies Include="$(OutputDir)/*.Tests.dll"/>
</ItemGroup>

<Target Name="Test" DependsOnTargets="Build">
<CallTarget Targets="TestOnly"/>
</Target>

<Target Name="TestOnly" DependsOnTargets="RunNUnitTC;RunNUnit"/>

<Target Name="RunNUnitTC" Condition="'$(teamcity_version)' != ''">
<ItemGroup>
<TestAssemblies Include="$(RootDir)/output/$(Configuration)/*.Tests.dll"/>
</ItemGroup>
<NUnitTeamCity
Assemblies="@(TestAssemblies)"
ExcludeCategory="SkipOnTeamCity;SkipOnBuildServer;SkipOnTeamCityRandomTestFailure;$(excludedCategories);$(ExtraExcludeCategories)"
ExcludeCategory="SkipOnTeamCity;SkipOnBuildServer;SkipOnTeamCityRandomTestFailure$(ExtraExcludeCategories)"
NUnitVersion="NUnit-2.6.3" />
</Target>

<Target Name="RunNUnit" Condition="'$(teamcity_version)' == ''">
<ItemGroup>
<TestAssemblies Include="$(RootDir)/output/$(Configuration)/*.Tests.dll"/>
</ItemGroup>
<NUnit Assemblies="@(TestAssemblies)"
ToolPath="$(RootDir)/packages/NUnit.Runners.Net4.2.6.4/tools"
TestInNewThread="false"
ExcludeCategory="$(excludedCategories);$(ExtraExcludeCategories)"
ExcludeCategory="$(excludedCategories)$(ExtraExcludeCategories)"
WorkingDirectory="$(OutputDir)"
Force32Bit="$(useNUnit-x86)"
Verbose="true"
Expand Down

0 comments on commit b1b9b38

Please sign in to comment.