forked from microsoft/MIEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildAndTest.proj
55 lines (42 loc) · 1.79 KB
/
BuildAndTest.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0"
DefaultTargets="BuildAndTest"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask
AssemblyFile="src\packages\xunit.runners.2.0.0\tools\xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'=='' ">Debug</Configuration>
<OutDir Condition=" '$(OutDir)'=='' ">$(MSBuildThisFileDirectory)bin\$(Configuration)\</OutDir>
<SourceHome Condition=" '$(SourceHome)'=='' ">$(MSBuildThisFileDirectory)src\</SourceHome>
<ToolsHome Condition=" '$(ToolsHome)'=='' ">$(MSBuildThisFileDirectory)tools\</ToolsHome>
<!--Don't run unit tests for lab builds -->
<TargetsToRun>Build;Test</TargetsToRun>
<TargetsToRun Condition="'$(Configuration)' == 'Lab.Release' OR '$(Configuration)' == 'Lab.Debug'">Build</TargetsToRun>
</PropertyGroup>
<ItemGroup>
<Solution Include="$(SourceHome)*.sln">
<AdditionalProperties>Configuration=$(Configuration)</AdditionalProperties>
</Solution>
</ItemGroup>
<Target Name="Clean">
<MSBuild Targets="Clean"
Projects="@(Solution)" />
</Target>
<Target Name="Build">
<MSBuild Targets="Build"
Projects="@(Solution)" />
</Target>
<Target Name="Rebuild">
<MSBuild Targets="Rebuild"
Projects="@(Solution)" />
</Target>
<Target Name="Test">
<ItemGroup>
<TestAssemblies Include="bin\$(Configuration)\**\*UnitTests.dll"/>
</ItemGroup>
<Exec Command="src\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe @(TestAssemblies, ' ') -xml "$(OutDir)TestResults.xml"" />
</Target>
<Target Name="BuildAndTest"
DependsOnTargets="$(TargetsToRun)" />
</Project>