Repository navigation
Conversation
- Pin the .NET 11.0.100 SDK in build/sdk/global.json and drop the .NET 8 SDK install workarounds from build/build.ps1 and build/build.sh - Add a temporary DOTNET_INSTALL_SKIP_TAR workaround for dotnet/install-scripts#750 while installing the .NET 11 SDK - Set LangVersion to 15.0 and retarget the Cake build project to net11.0 (Cake.Frosting 6.3.0, System.Security.Cryptography.Pkcs 11.0.0) - Run 'in-tests-core' against the first configured test target framework instead of hardcoding net10.0 - Install/select the .NET 11 SDK in CI workflows (setup-additional-tools, run-tests, run-tests-selected, generate-coverage-report) and update actions.lock
Core WebAssembly with net11.0 is no longer experimental, so expose RuntimeMoniker.CoreWasm11_0 ("corewasm11.0") as a public constant.
Retarget the test projects to net11.0 and keep net472 (net462/net48) on Windows only. Add TestDefaults to centralize the default Core/R2R/NativeAOT/WASM toolchains and runtimes (net11.0) and migrate call sites and test expectations accordingly. Enable the CoreWasm test rows in WasmTests; skip the NativeAOT memory diagnoser test on Windows Arm64 (issue dotnet#3329) instead of macOS; work around the vstest emoji-width issue in ParameterInstanceTests (issue #16512).
| // Still experimental | ||
| //public const string CoreWasm11_0 = "corewasm11.0"; | ||
| /// <summary>Core WebAssembly with net11.0</summary> | ||
| public const string CoreWasm11_0 = "corewasm11.0"; |
There was a problem hiding this comment.
Afaik it's still WIP until .Net 12, so we shouldn't expose this yet. Users who need it can specify the string directly.
There was a problem hiding this comment.
I've changed this constant visibility to internal.
It's expected to be used only for tests and will be removed when WASM on CoreCLR is available on .NET 12.
| <PropertyGroup> | ||
| <AssemblyTitle>BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks</AssemblyTitle> | ||
| <TargetFrameworks>net462;net48;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFrameworks>net11.0;net10.0;net8.0</TargetFrameworks> |
There was a problem hiding this comment.
We don't need to test 3 core runtimes. Can just do 10 and 11.
There was a problem hiding this comment.
ManualRunning.MultipleFrameworks is expected to be used to tests lagacy tfms compatibility also.
So I've leaved net8.0 on this project.
(When migrated to xUnit.v3. this project using TUnit to test net462)
| Assert.True(runtime is ClrRuntime, $"Actual runtime: {runtime}"); | ||
| else | ||
| Assert.True(runtime is MonoRuntime, $"Actual runtime: {runtime}"); | ||
| #elif NET11_0_OR_GREATER |
There was a problem hiding this comment.
It looks like the net10 and 8 branches are dead code.
| <Project Path="tests/BenchmarkDotNet.IntegrationTests.ManualRunning/BenchmarkDotNet.IntegrationTests.ManualRunning.csproj" /> | ||
| <Project Path="tests/BenchmarkDotNet.IntegrationTests.MonoBenchmarks/BenchmarkDotNet.IntegrationTests.MonoBenchmarks.csproj" /> | ||
| <Project Path="tests/BenchmarkDotNet.IntegrationTests.WasmBenchmarks/BenchmarkDotNet.IntegrationTests.WasmBenchmarks.csproj" /> | ||
| <Project Path="tests/BenchmarkDotNet.IntegrationTests.RuntimeAsync/BenchmarkDotNet.IntegrationTests.RuntimeAsync.csproj" /> |
There was a problem hiding this comment.
Can you also add this project to the CI test runs?
This PR update CI tests to use .NET 11.
The purpose of changes are to test .NET 11 specific JIT behaviors and features(e.g. CoreWasm)
.NET 10 tests are intentionally omitted because running both .NET 10/11 tests takes long time and required additional workload (
wasm-tools-net10).Other changes
1. Add
TestDefaults.csAdd file that define common test settings.
2. Modify
ParameterInstanceTests.csAdd
#ifdef NETto avoid vstest related issue.3. Modify
RuntimeMoniker.csEnable
CoreWasmand related tests. (It's still experimental on .NET 11 though)4. Update
build/common.propsUpdate
LangVersionfrom14to15