diff options
author | Tarek Mahmoud Sayed <tarekms@microsoft.com> | 2017-01-21 07:34:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-21 07:34:45 +0300 |
commit | 1e7c415391be57221db7dac5bf59d54cdda260f0 (patch) | |
tree | 0b983eec859a92e74188fcadafded38dea16bdc5 /external/test-runtime/XUnit.Runtime.depproj | |
parent | 178df9c997237effb073d922d7a598d9e717b2bf (diff) |
Enable NetFX tests (Step 1) (#15344)
* Enable NetFX tests (Step 1)
This is the initial changes to enable NetFx test runner. there is more changes will be done but this change is getting the xunit runner to work when targeting NetFX
* Update the xunit console runner version
* Fix the platform filtering
* Exclude not needed netcore xunit assembly for netfx
* Incremental fixes
Diffstat (limited to 'external/test-runtime/XUnit.Runtime.depproj')
-rw-r--r-- | external/test-runtime/XUnit.Runtime.depproj | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 70e52b2d37..5db9b20baf 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -2,31 +2,48 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> - <NuGetTargetMoniker>.NETStandard,Version=v2.0</NuGetTargetMoniker> <IsRuntimeAssembly>false</IsRuntimeAssembly> <!-- Given that xunit packages bring with them part of the framework, we need to specify a runtime in order to get the assets This RID value doesn't really matter, since the assets we are copying are not RID specific, so defaulting to Windows here --> <NugetRuntimeIdentifier>win7-x64</NugetRuntimeIdentifier> <OutputPath>$(RuntimePath)</OutputPath> + <XUnitConsoleRunnerVersion>2.2.0-beta2-build3300</XUnitConsoleRunnerVersion> </PropertyGroup> <ItemGroup> <None Include="project.json" /> </ItemGroup> + <ItemGroup> + <PackageToInclude Include="xunit.abstractions"/> + <PackageToInclude Include="xunit.assert"/> + <PackageToInclude Include="xunit.extensibility.core"/> + <PackageToInclude Include="xunit.extensibility.execution"/> + <PackageToInclude Include="xunit.runner.utility"/> + <PackageToInclude Include="Microsoft.xunit.netcore.extensions"/> + <PackageToInclude Include="Microsoft.DotNet.xunit.performance.run.core"/> + <PackageToInclude Include="Newtonsoft.Json"/> + </ItemGroup> + + <ItemGroup Condition="'$(TargetGroup)' != 'netfx'"> + <PackageToInclude Include="xunit.console.netcore"/> + </ItemGroup> + + <ItemGroup Condition="'$(TargetGroup)' == 'netfx'"> + <PackageToInclude Include="xunit.runner.console"/> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> - <Target Name="FilterNugetPackage" AfterTargets="ResolveNuGetPackages"> - <!-- Filter down to just xunit assets --> + + <Target Name="AddXunitConsoleRunner" BeforeTargets="ResolveReferences" Condition="'$(TargetGroup)' == 'netfx'"> + <Error Condition="!Exists('$(PackagesDir)xunit.runner.console\$(XUnitConsoleRunnerVersion)\tools\xunit.console.exe')" + Text="Error: looks the package $(PackagesDir)xunit.runner.console\$(XUnitConsoleRunnerVersion) not restored or missing xunit.console.exe." + /> <ItemGroup> - <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)'!='xunit.abstractions' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='xunit.assert' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='xunit.extensibility.core' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='xunit.extensibility.execution' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='xunit.console.netcore' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='xunit.runner.utility' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='Microsoft.xunit.netcore.extensions' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='Microsoft.DotNet.xunit.performance.run.core' And - '%(ReferenceCopyLocalPaths.NuGetPackageId)'!='Newtonsoft.Json' - " /> + <ReferenceCopyLocalPaths Include="$(PackagesDir)xunit.runner.console\$(XUnitConsoleRunnerVersion)\tools\*.*"> + <Private>false</Private> + <NuGetPackageId>xunit.runner.console</NuGetPackageId> + <NuGetPackageVersion>$(XUnitConsoleRunnerVersion)</NuGetPackageVersion> + </ReferenceCopyLocalPaths> </ItemGroup> </Target> </Project> |