Skip to content

Commit

Permalink
Switch to Arcade UnitTest targets and props
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich committed Jul 29, 2020
1 parent 071c4f4 commit aabdb0e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 219 deletions.
15 changes: 4 additions & 11 deletions tests/Microsoft.CodeAnalysis.Testing/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<Project>
<PropertyGroup>
<NoWarn>$(NoWarn);NU5125;NU3005</NoWarn>

Expand All @@ -8,16 +8,12 @@
</PropertyGroup>

<!-- Recognize MSTest projects -->
<PropertyGroup Condition="'$(IsUnitTestProject)' == '' and ($(MSBuildProjectName.EndsWith('.MSTest.UnitTests')) or $(MSBuildProjectName.EndsWith('.MSTest.Tests')))">
<IsUnitTestProject>true</IsUnitTestProject>
<UsingToolXUnit>false</UsingToolXUnit>
<PropertyGroup Condition="'$(TestRunnerName)' == '' and ($(MSBuildProjectName.EndsWith('.MSTest.UnitTests')) or $(MSBuildProjectName.EndsWith('.MSTest.Tests')))">
<TestRunnerName>MSTest</TestRunnerName>
</PropertyGroup>

<!-- Recognize NUnit projects -->
<PropertyGroup Condition="'$(IsUnitTestProject)' == '' and ($(MSBuildProjectName.EndsWith('.NUnit.UnitTests')) or $(MSBuildProjectName.EndsWith('.NUnit.Tests')))">
<IsUnitTestProject>true</IsUnitTestProject>
<UsingToolXUnit>false</UsingToolXUnit>
<PropertyGroup Condition="'$(TestRunnerName)' == '' and ($(MSBuildProjectName.EndsWith('.NUnit.UnitTests')) or $(MSBuildProjectName.EndsWith('.NUnit.Tests')))">
<TestRunnerName>NUnit</TestRunnerName>
</PropertyGroup>

Expand All @@ -37,9 +33,6 @@
<NUnit3TestAdapterVersion Condition="'$(NUnit3TestAdapterVersion)' == ''">3.15.1</NUnit3TestAdapterVersion>
</PropertyGroup>

<!-- Import specialized props files of supported test runners -->
<Import Project="$(MSBuildThisFileDirectory)tools\$(TestRunnerName)\$(TestRunnerName).props" Condition="'$(TestRunnerName)' != '' and Exists('$(MSBuildThisFileDirectory)tools\$(TestRunnerName)\$(TestRunnerName).props')"/>

<PropertyGroup>
<TestTargetFrameworks>netcoreapp3.1;net472;net46;netcoreapp1.1;netcoreapp2.0</TestTargetFrameworks>

Expand Down Expand Up @@ -71,7 +64,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\..\RoslynSDK.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopAnalyzersVersion)" PrivateAssets="all" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)..\..\stylecop.json" Link="stylecop.json" />
Expand Down
5 changes: 1 addition & 4 deletions tests/Microsoft.CodeAnalysis.Testing/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<ItemGroup Condition="'$(UsingToolXUnit)' == 'true' and '$(IsUnitTestProject)' == 'true'">
<ItemGroup Condition="'$(TestRunnerName)' == 'XUnit' and '$(IsUnitTestProject)' == 'true'">
<PackageReference Include="Xunit.Combinatorial" Version="$(XunitCombinatorialVersion)" />
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!-- Import specialized targets files of supported test runners -->
<Import Project="$(MSBuildThisFileDirectory)tools\$(TestRunnerName)\$(TestRunnerName).targets" Condition="'$(TestRunnerName)' != '' and Exists('$(MSBuildThisFileDirectory)tools\$(TestRunnerName)\$(TestRunnerName).targets')"/>
</Project>

This file was deleted.

99 changes: 0 additions & 99 deletions tests/Microsoft.CodeAnalysis.Testing/tools/MSTest/MSTest.targets

This file was deleted.

4 changes: 0 additions & 4 deletions tests/Microsoft.CodeAnalysis.Testing/tools/NUnit/NUnit.props

This file was deleted.

98 changes: 0 additions & 98 deletions tests/Microsoft.CodeAnalysis.Testing/tools/NUnit/NUnit.targets

This file was deleted.

2 changes: 1 addition & 1 deletion tests/VisualStudio.Roslyn.SDK/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<ItemGroup Condition="'$(UsingToolXUnit)' == 'true' and '$(IsUnitTestProject)' == 'true'">
<ItemGroup Condition="'$(TestRunnerName)' == 'XUnit' and '$(IsUnitTestProject)' == 'true'">
<PackageReference Include="Xunit.Combinatorial" Version="$(XunitCombinatorialVersion)" />
</ItemGroup>

Expand Down

0 comments on commit aabdb0e

Please sign in to comment.