diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/AssemblyInfo.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/AssemblyInfo.cs deleted file mode 100644 index 79b875cd6309f7..00000000000000 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/AssemblyInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -// 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. - -using System; -using Xunit; - -[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/38283", TestPlatforms.Browser)] \ No newline at end of file diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/ActionBlockTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/ActionBlockTests.cs index 8b7c7be7945d94..2bdf52c720192d 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/ActionBlockTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/ActionBlockTests.cs @@ -197,7 +197,7 @@ public async Task TestSchedulerUsage() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestInputCount() { foreach (bool sync in DataflowTestHelpers.BooleanValues) @@ -254,7 +254,7 @@ public async Task TestOrderMaintained() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestNonGreedy() { foreach (bool sync in DataflowTestHelpers.BooleanValues) @@ -417,7 +417,7 @@ public async Task TestNullReturnedTasks() actual: sumOfOdds); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestParallelExecution() { int dop = 2; @@ -437,7 +437,7 @@ public async Task TestParallelExecution() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestReleasingOfPostponedMessages() { foreach (bool sync in DataflowTestHelpers.BooleanValues) diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DataflowBlockExtensionTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DataflowBlockExtensionTests.cs index d022a31de866d3..95e0826f08a580 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DataflowBlockExtensionTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DataflowBlockExtensionTests.cs @@ -454,7 +454,7 @@ public void TestLinkTo_ArgumentValidation() Assert.Throws(() => source.LinkTo(target, null, i => true)); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void TestLinkTo_TwoPhaseCommit() { var source1 = new BufferBlock(); @@ -478,7 +478,7 @@ public void TestLinkTo_TwoPhaseCommit() Assert.Equal(expected: 43, actual: tuple.Item2); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestLinkTo_DoubleLinking() { foreach (bool greedy in DataflowTestHelpers.BooleanValues) @@ -971,7 +971,7 @@ public async Task TestReceive_AlreadyAvailable() Assert.Equal(expected: 0, actual: buffer.Count); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestReceive_NotYetAvailable() { var buffer = new BufferBlock(); @@ -1028,7 +1028,7 @@ public async Task TestReceive_TimeoutZero() } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestReceive_Cancellation() { var bb = new BufferBlock(); @@ -1066,7 +1066,7 @@ public async Task TestReceive_Cancellation() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestReceive_CanceledSource() { foreach (bool beforeReceive in DataflowTestHelpers.BooleanValues) @@ -1121,6 +1121,7 @@ public async Task TestReceiveAsync_ManyInOrder() } [Fact] + [PlatformSpecific(~TestPlatforms.Browser)] // uses a lot of stack public async Task TestReceiveAsync_LongChain() { const int Length = 10000; @@ -1706,7 +1707,7 @@ public void TestEncapsulate_ArgumentValidation() () => DataflowBlock.Encapsulate(new BufferBlock(), new BufferBlock()).Fault(null)); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void TestEncapsulate_LinkingAndUnlinking() { var buffer = new BufferBlock(); @@ -1921,6 +1922,7 @@ public async Task TestOutputAvailableAsync_DataAfterCompletion() } [Fact] + [PlatformSpecific(~TestPlatforms.Browser)] // uses a lot of stack public async Task TestOutputAvailableAsync_LongSequence() { const int iterations = 10000; // enough to stack overflow if there's a problem diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs index 1306db2dee4cc4..3ee2bf17f5a20d 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs @@ -9,7 +9,7 @@ namespace System.Threading.Tasks.Dataflow.Tests { public class DebugAttributeTests { - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void TestDebuggerDisplaysAndTypeProxies() { // Test both canceled and non-canceled diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/JoinBlockTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/JoinBlockTests.cs index f8b1aa20d95cb5..5756dbd6e6c5dc 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/JoinBlockTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/JoinBlockTests.cs @@ -72,7 +72,7 @@ public void TestArgumentExceptions() DataflowTestHelpers.TestArgumentsExceptions>(new JoinBlock()); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] public async Task TestPostThenReceive() { const int Iters = 3; diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/SimpleNetworkTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/SimpleNetworkTests.cs index 65d292d67d1d39..74093aca6d22fe 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/SimpleNetworkTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/SimpleNetworkTests.cs @@ -169,7 +169,7 @@ public async Task BufferBlocksToBatchNonGreedyToAction() Assert.Equal(expected: Iterations / b.BatchSize, actual: completedCount); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] public async Task BroadcastToActions() { var b = new BroadcastBlock(i => i); diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformBlockTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformBlockTests.cs index 7130d277051e49..98bae54caa144c 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformBlockTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformBlockTests.cs @@ -283,7 +283,7 @@ public async Task TestCountZeroAtCompletion() Assert.Equal(expected: 0, actual: tb.OutputCount); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void TestInputCount() { foreach (bool sync in DataflowTestHelpers.BooleanValues) @@ -635,7 +635,7 @@ public async Task TestOrdering_Async_OrderedDisabled() await tb.Completion; } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestOrdering_Sync_OrderedDisabled() { // If ordering were enabled, this test would hang. diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformManyBlockTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformManyBlockTests.cs index 778aa2c8acdbf5..79906cd9bef333 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformManyBlockTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/TransformManyBlockTests.cs @@ -311,7 +311,7 @@ public async Task TestCountZeroAtCompletion() Assert.Equal(expected: 0, actual: tb.OutputCount); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void TestInputCount() { foreach (bool sync in DataflowTestHelpers.BooleanValues) @@ -748,7 +748,7 @@ public async Task TestOrdering_Async_OrderedDisabled(bool trustedEnumeration) await tb.Completion; } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [InlineData(true)] [InlineData(false)] public async Task TestOrdering_Sync_OrderedDisabled(bool trustedEnumeration) @@ -776,7 +776,7 @@ public async Task TestOrdering_Sync_OrderedDisabled(bool trustedEnumeration) await tb.Completion; } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task TestOrdering_Sync_BlockingEnumeration_NoDeadlock(bool ensureOrdered) diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/WriteOnceBlockTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/WriteOnceBlockTests.cs index b229f23d1a8728..7751e7490a1b0a 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/WriteOnceBlockTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/WriteOnceBlockTests.cs @@ -174,7 +174,7 @@ public async Task TestPostThenReceive() await wob.Completion; } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task TestReceiveThenPost() { var wob = new WriteOnceBlock(null); @@ -207,7 +207,7 @@ public async Task TestTryReceiveWithFilter() await wob.Completion; } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [Fact] public async Task TestBroadcasting() { var wob = new WriteOnceBlock(i => i + 1); diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj b/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj index 8ed00176882ceb..64d15af718d8e9 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj @@ -4,7 +4,6 @@ $(NetCoreAppCurrent);$(NetFrameworkCurrent) - diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index e1c0aef32de4ff..3194d628f15bb5 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -122,11 +122,11 @@ app-builder: $(DOTNET) build $(TOP)/tools-local/tasks/mobile.tasks/WasmAppBuilder run-tests-v8-%: - PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=V8 + PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=V8 $(MSBUILD_ARGS) run-tests-sm-%: - PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=SpiderMonkey + PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=SpiderMonkey $(MSBUILD_ARGS) run-tests-jsc-%: - PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=JavaScriptCore + PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=JavaScriptCore $(MSBUILD_ARGS) run-tests-%: - PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) + PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) $(MSBUILD_ARGS)