summaryrefslogtreecommitdiff
path: root/tests/tests.targets
diff options
context:
space:
mode:
authordotnet-bot <dotnet-bot@microsoft.com>2015-01-30 14:14:42 -0800
committerdotnet-bot <dotnet-bot@microsoft.com>2015-01-30 14:14:42 -0800
commitef1e2ab328087c61a6878c1e84f4fc5d710aebce (patch)
treedee1bbb89e9d722e16b0d1485e3cdd1b6c8e2cfa /tests/tests.targets
downloadcoreclr-ef1e2ab328087c61a6878c1e84f4fc5d710aebce.tar.gz
coreclr-ef1e2ab328087c61a6878c1e84f4fc5d710aebce.tar.bz2
coreclr-ef1e2ab328087c61a6878c1e84f4fc5d710aebce.zip
Initial commit to populate CoreCLR repo
[tfs-changeset: 1407945]
Diffstat (limited to 'tests/tests.targets')
-rw-r--r--tests/tests.targets67
1 files changed, 67 insertions, 0 deletions
diff --git a/tests/tests.targets b/tests/tests.targets
new file mode 100644
index 0000000000..0923029637
--- /dev/null
+++ b/tests/tests.targets
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <UsingTask AssemblyFile="$(PackagesDir)xunit.runners.2.0.0-beta5-build2785\tools\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
+
+ <ItemGroup>
+ <_SkipTestAssemblies Include="$(SkipTestAssemblies)" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <TestAssemblyDir Condition="'$(TestAssemblyDir)' == ''">$(BaseOutputPathWithConfig)\tests\XunitRunner\</TestAssemblyDir>
+ <__TestRunHtmlLog Condition="'$(__TestRunHtmlLog)' == ''">$(__LogsDir)\TestRun.html</__TestRunHtmlLog>
+ </PropertyGroup>
+ <Target Name="FindTestDirectories">
+ <ItemGroup>
+ <AllTestAssemblies Include="$(TestAssemblyDir)*.XUnitWrapper.dll" />
+ <TestAssemblies Include="@(AllTestAssemblies)" Exclude="@(_SkipTestAssemblies -> '$(TestAssemblyDir)%(Identity).XUnitWrapper.dll')" />
+ </ItemGroup>
+
+ <Error Text=" The Wrappers must be compiled and placed at $(TestAssemblyDir) before they can be run, Do a clean Test Run"
+ Condition="'@(AllTestAssemblies)' == ''" />
+
+ <Message Text= "AllTestAssemblies= @(AllTestAssemblies)"/>
+ <Message Text= "TestAssemblies= @(TestAssemblies)"/>
+ <Message Text= "_SkipTestAssemblies= @(_SkipTestAssemblies -> '$(TestAssemblyDir)%(Identity).XUnitWrapper.dll')"/>
+ </Target>
+ <PropertyGroup>
+ <ThisTestWorkingDir>$(TestAssemblyDir)\</ThisTestWorkingDir>
+ </PropertyGroup>
+
+ <UsingTask
+ AssemblyFile="$(SourceDir)\packages\xunit.abstractions.$(XunitVersionCompiled)\lib\portable-net45+aspnetcore50+win+wpa81+wp80+monotouch+monoandroid\xunit.runner.msbuild.dll"
+ TaskName="Xunit.Runner.MSBuild.xunit" />
+
+ <Target Name="RunTests"
+ DependsOnTargets="FindTestDirectories"
+ Inputs="@(TestAssemblies)"
+ Outputs="$(ThisTestWorkingDir)\*.*"
+ Condition="'$(SkipTests)' != 'True'">
+
+
+ <PropertyGroup>
+ <ExcludeTraits Condition="'$(ExcludeTraits)'==''">category=outerloop;category=failing</ExcludeTraits>
+ </PropertyGroup>
+ <ItemGroup>
+ <IncludeTraitsItems Include="$(IncludeTraits)" />
+ <ExcludeTraitsItems Include="$(ExcludeTraits)" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <XunitOptions Condition="'@(IncludeTraitsItems)'!=''">$(XunitOptions)-trait @(IncludeTraitsItems, ' -trait ') </XunitOptions>
+ <XunitOptions Condition="'@(ExcludeTraitsItems)'!=''">$(XunitOptions)-notrait @(ExcludeTraitsItems, ' -notrait ') </XunitOptions>
+ <XunitOptions >$(XunitOptions) -parallel all </XunitOptions>
+ <ParallelizeAssemblies>True</ParallelizeAssemblies>
+ <ParallelizeTestCollections>True</ParallelizeTestCollections>
+ </PropertyGroup>
+
+ <xunit Assemblies="@(TestAssemblies)"
+ WorkingFolder ="$(ThisTestWorkingDir)"
+ ParallelizeAssemblies="True"
+ ParallelizeTestCollections="True"
+ Html="$(__TestRunHtmlLog)"
+ />
+
+ </Target>
+
+</Project>