Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Replace netstandard test projects with tfms
Browse files Browse the repository at this point in the history
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.
  • Loading branch information
ViktorHofer committed May 27, 2019
1 parent d58a8ad commit b91cacd
Show file tree
Hide file tree
Showing 588 changed files with 1,144 additions and 3,986 deletions.
3 changes: 2 additions & 1 deletion src/CoreFx.Private.TestUtilities/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{5E0DB390-A45E-41BE-8304-B840327FE597}</ProjectGuid>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>CoreFx.Private.TestUtilities.Tests</RootNamespace>
Expand Down
4 changes: 3 additions & 1 deletion src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
netfx;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{72E21903-0FBA-444E-9855-3B4F05DFC1F9}</ProjectGuid>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Common\tests\System\Threading\Tasks\Sources\ManualResetValueTaskSource.cs">
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.CSharp/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
netfx;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ProjectGuid>{82B54697-0251-47A1-8546-FC507D0F3B08}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
<!--
We wish to test operations that would result in
"Operator '-' cannot be applied to operands of type 'ushort' and 'EnumArithmeticTests.UInt16Enum'"
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.Win32.Primitives/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{3B17C130-FF2C-4B41-82C6-FADF4ED7FDA0}</ProjectGuid>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Win32ExceptionTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netfx;
uap;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<PropertyGroup>
<ProjectGuid>{0D1E2954-A5C7-4B8C-932A-31EB4A96A737}</ProjectGuid>
<DefineConstants>$(DefineConstants);XMLSERIALIZERGENERATORTESTS</DefineConstants>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<CoverageSupported>false</CoverageSupported>
</PropertyGroup>
<PropertyGroup>
<SkipTestsOnPlatform Condition="'$(TargetGroup)' == 'uap' OR '$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64' OR '$(ArchGroup)' == 'armel' OR '$(TargetGroup)' == 'netfx'">true</SkipTestsOnPlatform>
<SkipTestsOnPlatform Condition="'$(TargetGroup)' == 'uap' OR '$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64' OR '$(ArchGroup)' == 'armel'">true</SkipTestsOnPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<!-- We're building netcoreap, run on the test CLI
Expand All @@ -28,7 +28,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include=".\AlwaysPassTest.cs" />
<Content Include="$(GeneratorRuntimeConfig)">
<Content Condition="'$(GeneratorRuntimeConfig)' != ''" Include="$(GeneratorRuntimeConfig)">
<!-- Rename it to match the Generator application name -->
<Link>dotnet-Microsoft.XmlSerializer.Generator.runtimeconfig.json</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
3 changes: 2 additions & 1 deletion src/System.AppContext/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/System.AppContext/tests/System.AppContext.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{6F04B167-A03F-4206-8481-60213C3EF9B9}</ProjectGuid>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/System.Buffers/tests/ArrayPool/CollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace System.Buffers.ArrayPool.Tests
{
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public class CollectionTests : ArrayPoolTest
{
[OuterLoop("This is a long running test (over 2 minutes)")]
Expand Down
3 changes: 2 additions & 1 deletion src/System.Buffers/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/System.Buffers/tests/System.Buffers.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ArrayPool\ArrayPoolTest.cs" />
Expand Down
4 changes: 3 additions & 1 deletion src/System.CodeDom/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
netfx;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/System.CodeDom/tests/System.CodeDom.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ProjectGuid>{0D1E2954-A5C7-4B8C-932A-31EB4A96A726}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\CodeDom\CodeAttributeDeclarationCollectionTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static void TestAddNullValue_IDictionaryOfString_null()
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing bug fix in https://github.com/dotnet/corefx/pull/28115")]
public static void TestAddNullValue_IDictionary_ReferenceType_null()
{
// using IDictionary interface
Expand All @@ -97,7 +96,6 @@ public static void TestAddNullValue_IDictionary_ValueType_null_indexer()
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing bug fix in https://github.com/dotnet/corefx/pull/28115")]
public static void TestAddNullValue_IDictionary_ValueType_null_add()
{
Action action = () =>
Expand Down Expand Up @@ -633,7 +631,6 @@ public static void TestDebuggerAttributes_Null()
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework hasn't received the fix for https://github.com/dotnet/corefx/issues/18432 yet.")]
public static void TestNullComparer()
{
AssertDefaultComparerBehavior(new ConcurrentDictionary<EqualityApiSpy, int>((IEqualityComparer<EqualityApiSpy>)null));
Expand Down Expand Up @@ -678,7 +675,6 @@ public bool Equals(EqualityApiSpy other)
}

[Fact]
[SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Framework hasn't received the fix for https://github.com/dotnet/corefx/issues/18432 yet.")]
public static void TestNullComparer_netfx()
{
Assert.Throws<ArgumentNullException>(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ProjectGuid>{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}</ProjectGuid>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetGroup)'!='netcoreapp'">
Expand Down
4 changes: 2 additions & 2 deletions src/System.Collections.Immutable/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
uap;
netcoreapp;
netfx;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
<NoWarn>0436</NoWarn>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetGroup)'!='netcoreapp' And '$(TargetGroup)'!='uap'">
Expand Down Expand Up @@ -96,7 +96,7 @@
<None Include="ClassDiagram1.cd" />
<Compile Include="ImmutableArray\ImmutableArray.Generic.Tests.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<ItemGroup Condition="'$(TargetsNetFx)' != 'true'">
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<DefaultReferenceExclusions Include="System.Collections.Immutable" />
<ReferenceFromRuntime Include="System.Collections.Immutable" />
Expand Down
1 change: 0 additions & 1 deletion src/System.Collections.NonGeneric/tests/ArrayListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,6 @@ public DerivedArrayList(ICollection c) : base(c) { }
}
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class ArrayList_SyncRootTests
{
private ArrayList _arrDaughter;
Expand Down
3 changes: 2 additions & 1 deletion src/System.Collections.NonGeneric/tests/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion src/System.Collections.NonGeneric/tests/HashtableTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,6 @@ private void RemoveElements(string strName)
}
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class Hashtable_SyncRootTests
{
private Hashtable _hashDaughter;
Expand Down
1 change: 0 additions & 1 deletion src/System.Collections.NonGeneric/tests/QueueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ public Foo(int intValue)
}
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class Queue_SyncRootTests
{
private const int NumberOfElements = 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ private static MyReadOnlyCollectionBase CreateCollection()
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public static void SyncRoot()
{
MyReadOnlyCollectionBase collection = CreateCollection();
Expand Down
1 change: 0 additions & 1 deletion src/System.Collections.NonGeneric/tests/SortedListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,6 @@ public class SortedList_SyncRootTests

[Fact]
[OuterLoop]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/34339")] // Changed behavior
public void GetSyncRootBasic()
{
// Testing SyncRoot is not as simple as its implementation looks like. This is the working
Expand Down
1 change: 0 additions & 1 deletion src/System.Collections.NonGeneric/tests/StackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ public Foo(int intValue)
}
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior
public class Stack_SyncRootTests
{
private Stack _stackDaughter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ProjectGuid>{EE95AE39-845A-42D3-86D0-8065DBE56612}</ProjectGuid>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7F5F5134-00FE-4DE8-B20C-3DA8BA2EBA68}</ProjectGuid>
<Configurations>netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
Expand Down
2 changes: 1 addition & 1 deletion src/System.Collections/tests/Configurations.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
netstandard;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace System.Collections.Tests
/// </summary>
public abstract partial class Dictionary_Generic_Tests<TKey, TValue> : IDictionary_Generic_Tests<TKey, TValue>
{
protected override ModifyOperation ModifyEnumeratorThrows => PlatformDetection.IsFullFramework ? base.ModifyEnumeratorThrows : ModifyOperation.Add | ModifyOperation.Insert;
protected override ModifyOperation ModifyEnumeratorThrows => ModifyOperation.Add | ModifyOperation.Insert;

protected override ModifyOperation ModifyEnumeratorAllowed => PlatformDetection.IsFullFramework ? base.ModifyEnumeratorAllowed : ModifyOperation.Remove | ModifyOperation.Clear;
protected override ModifyOperation ModifyEnumeratorAllowed => ModifyOperation.Remove | ModifyOperation.Clear;

#region IDictionary<TKey, TValue Helper Methods

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{F5EB9630-AD29-4880-963F-F2D39C684D8A}</ProjectGuid>
<Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project>
<PropertyGroup>
<BuildConfigurations>
netstandard;
netcoreapp;
netfx;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
Loading

0 comments on commit b91cacd

Please sign in to comment.