[wasm][coreclr] WIP runtime tests on CI#123377
[wasm][coreclr] WIP runtime tests on CI#123377radekdoulik wants to merge 98 commits intodotnet:mainfrom
Conversation
Set `isTailcall` to `false`, when preparing the call. This is similar to how we set other state vars for the call, so I did it this way. Alternatively we can reset the `isTailcall` after updating the stack and frame for tailcalls. That would invalidate the meaning of the variable for the rest of the tailcall though, so we would need to rename it at least to signal, that it is valid only in the beginning of the tailcall.
Based on changes from the previous branch (https://github.com/radekdoulik/runtime/tree/clr-wasm-runtime-tests-with-node)
|
/azp run runtime |
|
Azure Pipelines failed to run 1 pipeline(s). |
src/tests/JIT/Directed/Misc/function_pointer/MutualThdRecur-fptr.il
Outdated
Show resolved
Hide resolved
| </Target> | ||
|
|
||
| <Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true' and '$(CLRTestKind)' != 'SharedLibrary'" /> | ||
| <Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true' and '$(CLRTestKind)' != 'SharedLibrary' and ('$(TargetArchitecture)' != 'wasm' or '$(RuntimeFlavor)' != 'CoreCLR')" /> |
There was a problem hiding this comment.
I assume that this will be removed once the CI integration work is done. If not, we should figure out what needs to change here (we want to be on the same tooling as the libraries tests, when possible, to help reduce cost of maintaining this test tree).
There was a problem hiding this comment.
The intention here is to be as close to the desktop runtime tests as possible, to keep the tests simple to debug, with minimal added complexity.
…s' into clr-wasm-runtime-tests-on-node-2
This reverts commit af6321d.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| if /i "%1" == "x64" (set __BuildArch=x64&shift&goto Arg_Loop) | ||
| if /i "%1" == "x86" (set __BuildArch=x86&shift&goto Arg_Loop) | ||
| if /i "%1" == "arm64" (set __BuildArch=arm64&shift&goto Arg_Loop) | ||
|
|
||
| if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop) | ||
| if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop) | ||
| if /i "%1" == "checked" (set __BuildType=Checked&shift&goto Arg_Loop) | ||
|
|
||
| if /i "%1" == "TestEnv" (set __TestEnv=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "sequential" (set __Sequential=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "parallel" (set __ParallelType=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "jitstress" (set DOTNET_JitStress=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "jitstressregs" (set DOTNET_JitStressRegs=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "jitminopts" (set DOTNET_JITMinOpts=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "jitforcerelocs" (set DOTNET_ForceRelocs=1&shift&goto Arg_Loop) | ||
|
|
||
| if /i "%1" == "printlastresultsonly" (set __PrintLastResultsOnly=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "logsdir" (set LogsDirArg=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "runcrossgen2tests" (set RunCrossGen2=1&shift&goto Arg_Loop) | ||
| REM This test feature is currently intentionally undocumented | ||
| if /i "%1" == "runlargeversionbubblecrossgen2tests" (set RunCrossGen2=1&set CrossgenLargeVersionBubble=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "synthesizepgo" (set CrossGen2SynthesizePgo=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "gcname" (set DOTNET_GCName=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "gcstresslevel" (set DOTNET_GCStress=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "gcsimulator" (set __GCSimulatorTests=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "longgc" (set __LongGCTests=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "ilasmroundtrip" (set __IlasmRoundTrip=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "timeout" (set __TestTimeout=%2&shift&shift&goto Arg_Loop) | ||
| if /i "%1" == "runincontext" (set RunInUnloadableContext=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "tieringtest" (set TieringTest=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "runnativeaottests" (set RunNativeAot=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "interpreter" (set RunInterpreter=1&shift&goto Arg_Loop) | ||
| if /i "%1" == "node" (set RunWithNodeJS=1&shift&goto Arg_Loop) | ||
|
|
There was a problem hiding this comment.
run.cmd documents and parses a node switch, but this script currently has no way to target the wasm architecture (wasm) or the browser OS (browser) the way run.sh does. As written, --node can’t be used to run the intended browser/wasm scenarios. Consider adding argument handling for wasm (arch) and browser (OS), and defaulting to browser when __BuildArch==wasm (similar to run.sh).
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 58 out of 59 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/tests/JIT/Directed/Misc/function_pointer/MutualThdRecur-fptr.il:13
- This IL file now declares the same extern assemblies multiple times (e.g. Microsoft.DotNet.XUnitExtensions, System.Runtime, TestLibrary). ILAsm typically treats duplicate .assembly extern declarations as an error. Please remove the duplicates or keep a single consolidated set of extern references at the top of the file.
| <TargetsBrowserOnMono>false</TargetsBrowserOnMono> | ||
| <TargetsBrowserOnMono Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'mono'">true</TargetsBrowserOnMono> | ||
| <TargetsBrowserOnCoreCLR>false</TargetsBrowserOnCoreCLR> | ||
| <TargetsBrowserOnCoreCLR Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'coreclr'">true</TargetsBrowserOnCoreCLR> | ||
| <TargetsMobile Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'coreclr'">false</TargetsMobile> | ||
| <MobileAppBundleDirName Condition="'$(TargetsMobile)' == 'true' and '$(TargetsBrowser)' != 'true'">AppBundle</MobileAppBundleDirName> | ||
| <MobileAppBundleDirName Condition="'$(TargetsBrowser)' == 'true'">wwwroot</MobileAppBundleDirName> | ||
| <MobileAppBundleDirName Condition="'$(TargetsBrowserOnMono)' == 'true'">wwwroot</MobileAppBundleDirName> |
There was a problem hiding this comment.
RuntimeFlavor comparisons in this file use inconsistent casing (e.g. 'mono'/'coreclr' vs 'Mono'/'CoreCLR'). Since RuntimeFlavor is set by pipelines as 'CoreCLR' by default, conditions like TargetsBrowserOnCoreCLR and TargetsMobile will never become true, which can break the CoreCLR browser/wasm flow (NodeJS path, payload prep, log checker gating). Consider normalizing once (e.g. $(RuntimeFlavor.ToLowerInvariant())) or comparing against the actual cased values consistently throughout the file.
| # Set default for RunWithNodeJS when using wasm architecture | ||
| if [ "$buildArch" = "wasm" ] && [ -z "$RunWithNodeJS" ]; then | ||
| export RunWithNodeJS=1 | ||
| fi |
There was a problem hiding this comment.
RunWithNodeJS is now defaulted on whenever buildArch=wasm. However this happens before buildOS inference and also applies even if the caller explicitly sets buildOS=wasi, where the "--node" mode isn’t applicable. Consider moving this default after the wasm->browser defaulting, and gating it on buildOS=browser (or only when buildOS is unset), so WASI test runs don’t inadvertently get forced into NodeJS mode.
TODO