Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop passing in auto-discovered xunit traits #35237

Merged
merged 6 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bce0a98620c1c5a110b2bba9912f3d5929069c6b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20201.2">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20221.14">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bce0a98620c1c5a110b2bba9912f3d5929069c6b</Sha>
</Dependency>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20201.2</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>5.0.0-beta.20201.2</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20201.2</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20201.2</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20221.14</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20201.2</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20201.2</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20201.2</MicrosoftDotNetRemoteExecutorVersion>
Expand Down
1 change: 0 additions & 1 deletion eng/testing/xunit/vstest.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TrxTestResultsName>testResults.trx</TrxTestResultsName>
<HtmlTestResultsName>testResults.html</HtmlTestResultsName>
<TestResultsName>$(HtmlTestResultsName)</TestResultsName>
<TestRunnerConfigPath>$(MSBuildThisFileDirectory)vstest.xunit.json</TestRunnerConfigPath>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions eng/testing/xunit/vstest.xunit.json

This file was deleted.

7 changes: 6 additions & 1 deletion eng/testing/xunit/xunit.console.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<TestResultsName>testResults.xml</TestResultsName>
<TestRunnerConfigPath>$(MSBuildThisFileDirectory)xunit.console.json</TestRunnerConfigPath>
<TestRunnerConfigPath>$(MSBuildThisFileDirectory)xunit.runner.json</TestRunnerConfigPath>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,6 +18,11 @@
around a dupliate type between System.Runtime.Serialization.Formatters and Newtonsoft.Json.
-->
<PackageReference Condition="'$(ArchiveTests)' != 'true'" Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
</ItemGroup>

<ItemGroup>
<None Include="$(TestRunnerConfigPath)"
CopyToOutputDirectory="PreserveNewest"
Visible="false" />
</ItemGroup>
</Project>
25 changes: 0 additions & 25 deletions eng/testing/xunit/xunit.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<Project>
<PropertyGroup>
<TargetOSCategory Condition="'$(TargetOS)' == 'Windows_NT'">nonwindowstests</TargetOSCategory>
<TargetOSCategory Condition="'$(TargetOS)' == 'Linux'">nonlinuxtests</TargetOSCategory>
<TargetOSCategory Condition="'$(TargetOS)' == 'OSX'">nonosxtests</TargetOSCategory>
<TargetOSCategory Condition="'$(TargetOS)' == 'FreeBSD'">nonfreebsdtests</TargetOSCategory>
<TargetOSCategory Condition="'$(TargetOS)' == 'NetBSD'">nonnetbsdtests</TargetOSCategory>
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved

<!-- Default and user defined categories -->
<_withCategories Condition="'$(WithCategories)' != ''">;$(WithCategories.Trim(';'))</_withCategories>
<_withoutCategories Condition="'$(WithoutCategories)' != ''">;$(WithoutCategories.Trim(';'))</_withoutCategories>
Expand All @@ -15,27 +9,8 @@
<_withoutCategories Condition="'$(ArchiveTests)' == 'true'">$(_withoutCategories);IgnoreForCI</_withoutCategories>
<_withoutCategories Condition="'$(TestScope)' == '' or '$(TestScope)' == 'innerloop'">$(_withoutCategories);OuterLoop</_withoutCategories>
<_withoutCategories Condition="!$(_withCategories.Contains('failing'))">$(_withoutCategories);failing</_withoutCategories>

<_targetCategory Condition="'$(TargetsNetCoreApp)' == 'true'">netcoreapp</_targetCategory>
<_targetCategory Condition="'$(TargetsNetFx)' == 'true'">netfx</_targetCategory>

<_withoutCategories>$(_withoutCategories);non$(_targetCategory)tests</_withoutCategories>
<_withoutCategories Condition="'$(TargetOSCategory)' != ''">$(_withoutCategories);$(TargetOSCategory)</_withoutCategories>
</PropertyGroup>

<ItemGroup>
<None Include="$(TestRunnerConfigPath)"
Link="xunit.runner.json"
CopyToOutputDirectory="PreserveNewest"
Visible="false" />
</ItemGroup>

<Target Name="ValidateTargetOSCategory"
BeforeTargets="GenerateRunScript">
<Error Condition="'$(TargetOSCategory)' == ''"
Text="TargetOS [$(TargetOS)] is unknown so we don't know how to configure the test run for this project [$(TestProjectName)]" />
</Target>

<Import Project="$(MSBuildThisFileDirectory)xunit.console.targets" Condition="'$(TestRunner)' == 'xunit.console'" />
<Import Project="$(MSBuildThisFileDirectory)vstest.targets" Condition="'$(TestRunner)' == 'vstest'" />
</Project>