Merge pull request #1520 from sergey-raevskiy/clarify-comment
[platform/upstream/coreclr.git] / tests / tests.targets
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
4   <UsingTask AssemblyFile="$(PackagesDir)xunit.runners\2.0.0-beta5-build2785\tools\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
5   
6   <ItemGroup>
7     <_SkipTestAssemblies Include="$(SkipTestAssemblies)" />
8   </ItemGroup>
9
10   <PropertyGroup>
11       <TestAssemblyDir Condition="'$(TestAssemblyDir)' == ''">$(BaseOutputPathWithConfig)\tests\XunitRunner\</TestAssemblyDir>
12       <__TestRunHtmlLog Condition="'$(__TestRunHtmlLog)' == ''">$(__LogsDir)\TestRun.html</__TestRunHtmlLog>
13       <__TestRunXmlLog Condition="'$(__TestRunXmlLog)' == ''">$(__LogsDir)\TestRun.xml</__TestRunXmlLog>
14   </PropertyGroup>
15   <Target Name="FindTestDirectories">
16     <ItemGroup>
17       <AllTestAssemblies Include="$(TestAssemblyDir)*.XUnitWrapper.dll" />
18       <TestAssemblies Include="@(AllTestAssemblies)" Exclude="@(_SkipTestAssemblies -> '$(TestAssemblyDir)%(Identity).XUnitWrapper.dll')" />
19     </ItemGroup>
20     
21     <Error  Text=" The wrappers must be compiled and placed at $(TestAssemblyDir) before they can be run, Do a clean Test Run"
22             Condition="'@(AllTestAssemblies)' == ''" />
23     
24     <Message Text= "AllTestAssemblies= @(AllTestAssemblies)"/>
25     <Message Text= "TestAssemblies= @(TestAssemblies)"/>
26     <Message Text= "_SkipTestAssemblies= @(_SkipTestAssemblies -> '$(TestAssemblyDir)%(Identity).XUnitWrapper.dll')"/>
27   </Target>
28    <PropertyGroup>
29       <ThisTestWorkingDir>$(TestAssemblyDir)\</ThisTestWorkingDir>
30   </PropertyGroup>
31
32   <UsingTask
33     AssemblyFile="$(SourceDir)\packages\xunit.abstractions\$(XunitVersionCompiled)\lib\portable-net45+aspnetcore50+win+wpa81+wp80+monotouch+monoandroid\xunit.runner.msbuild.dll"
34     TaskName="Xunit.Runner.MSBuild.xunit" />
35
36    <Target Name="RunTests"
37           DependsOnTargets="FindTestDirectories"
38           Inputs="@(TestAssemblies)"
39           Outputs="$(ThisTestWorkingDir)\*.*"
40           Condition="'$(SkipTests)' != 'True'">
41
42
43     <PropertyGroup>
44       <ExcludeTraits Condition="'$(ExcludeTraits)'==''">category=outerloop;category=failing</ExcludeTraits>
45     </PropertyGroup>
46     <ItemGroup>
47       <IncludeTraitsItems Include="$(IncludeTraits)" />
48       <ExcludeTraitsItems Include="$(ExcludeTraits)" />
49     </ItemGroup>
50
51     <xunit Assemblies="@(TestAssemblies)"
52       WorkingFolder="$(ThisTestWorkingDir)"
53       ParallelizeAssemblies="True"
54       ParallelizeTestCollections="True"
55       Html="$(__TestRunHtmlLog)"
56       Xml="$(__TestRunXmlLog)"
57       IncludeTraits="@(IncludeTraitsItems)"
58       ExcludeTraits="@(ExcludeTraitsItems)" /> 
59
60   </Target>
61
62 </Project>