[wasm] Re-enable source generator tests failing due to OOM (#60701)
authorAnkit Jain <radical@gmail.com>
Tue, 2 Nov 2021 20:16:25 +0000 (20:16 +0000)
committerGitHub <noreply@github.com>
Tue, 2 Nov 2021 20:16:25 +0000 (16:16 -0400)
commit5a078b513fd4955306ecd5c9d9418bcf87416d09
tree7f8d5e03b4f80f607c1af2b79a40ab499e4e022c
parent0691c754c7152e5eef04a090ef712ace82360cf9
[wasm] Re-enable source generator tests failing due to OOM (#60701)

This adds support for setting per-project optimization flags, and sets them for these projects so they don't OOM.

Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests
Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests
System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests
System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests
System.Text.RegularExpressions.Generators.Tests
Some individual ones are disabled due to
#58226, and #60899 .

Additionally, if a AOT build fails, then on linux it dumps the last few lines from dmesg, to help identify it was an oom-kill.

Fixes #51961 .

Co-authored-by: Larry Ewing <lewing@microsoft.com>
17 files changed:
eng/testing/WasmRunnerAOTTemplate.sh [new file with mode: 0644]
eng/testing/tests.targets
eng/testing/tests.wasm.targets
src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj
src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs
src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs
src/libraries/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Generators.Tests/System.Text.RegularExpressions.Generators.Tests.csproj
src/libraries/tests.proj
src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj
src/mono/wasm/build/WasmApp.Native.targets
src/tasks/AotCompilerTask/MonoAOTCompiler.cs
src/tasks/WasmAppBuilder/WasmAppBuilder.cs