Skip to content

Commit 4346bb3

Browse files
committed
wip
1 parent 28dcc44 commit 4346bb3

File tree

20 files changed

+263
-70
lines changed

20 files changed

+263
-70
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
120120

121121
# NOTE - Since threading is experimental, we don't want to block mainline work
122-
shouldContinueOnError: true
122+
# TODO put back shouldContinueOnError: true
123123
scenarios:
124124
- WasmTestOnBrowser
125125
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592

eng/testing/tests.browser.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
<!-- snapshots are not yet supported with threads -->
112112
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --no-memory-snapshot</WasmXHarnessMonoArgs>
113113
<!-- help unit test with PlatformDetection.IsThreadingSupported via IsBrowserThreadingSupported env variable -->
114-
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --setenv=IsBrowserThreadingSupported=true</WasmXHarnessMonoArgs>
114+
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --multithreaded --setenv=IsBrowserThreadingSupported=true</WasmXHarnessMonoArgs>
115115
</PropertyGroup>
116116

117117
<PropertyGroup Condition="'$(RunScriptCommand)' == ''">

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleFormatterTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ internal static (ConsoleLogger Logger, ConsoleSink Sink, ConsoleSink ErrorSink,
7474
}
7575

7676
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
77-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
7877
public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded()
7978
{
8079
// Arrange
@@ -88,7 +87,6 @@ public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded()
8887
}
8988

9089
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
91-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
9290
[MemberData(nameof(FormatterNames))]
9391
public void InvalidLogLevel_Throws(string formatterName)
9492
{
@@ -103,7 +101,6 @@ public void InvalidLogLevel_Throws(string formatterName)
103101
}
104102

105103
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
106-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
107104
[MemberData(nameof(FormatterNamesAndLevels))]
108105
public void NoMessageOrException_Noop(string formatterName, LogLevel level)
109106
{
@@ -123,7 +120,6 @@ public void NoMessageOrException_Noop(string formatterName, LogLevel level)
123120
}
124121

125122
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
126-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
127123
[MemberData(nameof(FormatterNamesAndLevels))]
128124
public void Log_LogsCorrectTimestamp(string formatterName, LogLevel level)
129125
{

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerTest.cs

Lines changed: 0 additions & 41 deletions
Large diffs are not rendered by default.

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/SimpleConsoleFormatterTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Microsoft.Extensions.Logging.Console.Test
1010
public class SimpleConsoleFormatterTests : ConsoleFormatterTests
1111
{
1212
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
13-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
1413
[InlineData(LoggerColorBehavior.Default)]
1514
[InlineData(LoggerColorBehavior.Enabled)]
1615
[InlineData(LoggerColorBehavior.Disabled)]
@@ -55,7 +54,6 @@ public void Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorB
5554
}
5655

5756
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
58-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
5957
public void Log_NoLogScope_DoesNotWriteAnyScopeContentToOutput()
6058
{
6159
// Arrange
@@ -111,7 +109,6 @@ public void Log_SingleLine_LogsWhenMessageIsNotProvided()
111109
}
112110

113111
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
114-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
115112
public void Log_SingleLine_LogsWhenBothMessageAndExceptionProvided()
116113
{
117114
// Arrange

src/libraries/Microsoft.Extensions.Logging/tests/DI.Common/Common/tests/Microsoft.Extensions.Logging.Testing.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<EnableDefaultItems>true</EnableDefaultItems>
55
</PropertyGroup>
66

7+
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
8+
<_WasmPThreadPoolSize Condition="'$(MonoWasmBuildVariant)' == 'multithread'">64</_WasmPThreadPoolSize>
9+
<WasmXHarnessMonoArgs>--setenv=XHARNESS_LOG_TEST_START=true --no-memory-snapshot</WasmXHarnessMonoArgs>
10+
</PropertyGroup>
11+
712
<ItemGroup>
813
<Compile Include="..\src\LogLevelAttribute.cs"
914
Link="tests\DI.Common\Common\src\LogLevelAttribute.cs" />

src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
1414
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser'">$(DefineConstants);Unix</DefineConstants>
1515
</PropertyGroup>
16+
17+
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
18+
<WasmXHarnessMonoArgs>--setenv=XHARNESS_LOG_TEST_START=true --no-memory-snapshot</WasmXHarnessMonoArgs>
19+
</PropertyGroup>
20+
1621
<ItemGroup>
1722
<Compile Include="System\ApplicationIdTests.cs" />
1823
<Compile Include="System\Convert.cs" />

src/libraries/System.Runtime.Extensions/tests/System/Random.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ public void Shared_IsSingleton()
516516
}
517517

518518
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
519-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
520519
public void Shared_ParallelUsage()
521520
{
522521
using var barrier = new Barrier(2);

src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@ public static void TestParallelForPaths_Exceptions()
885885
}
886886

887887
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
888-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91582", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
889888
public static void TestParallelScheduler()
890889
{
891890
ParallelOptions parallelOptions = new ParallelOptions();
@@ -993,7 +992,6 @@ public static void TestParallelScheduler()
993992
}
994993

995994
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
996-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
997995
public static void TestInvokeDOPAndCancel()
998996
{
999997
ParallelOptions parallelOptions = null;

src/libraries/System.Threading.Tasks.Parallel/tests/ParallelLoopResultTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ private static void OrderablePartitionerForEachPLRTest(
373373

374374
// Perform tests on various combinations of Stop()/Break()
375375
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
376-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91579", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
377376
public static void SimultaneousStopBreakTests()
378377
{
379378
//

0 commit comments

Comments
 (0)