-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm] Re-enable source generator tests failing due to OOM #60701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
4038554
8023855
e51a76f
8436395
9a6d859
4fb5bf4
485d481
5554733
ddb1ffb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…options for avoiding OOM .. and use a separate script template for AOT builds.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| EXECUTION_DIR=$(dirname $0) | ||
| SCENARIO=$3 | ||
|
|
||
| cd $EXECUTION_DIR | ||
|
|
||
| if [ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]; then | ||
| XHARNESS_OUT="$EXECUTION_DIR/xharness-output" | ||
| else | ||
| XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output" | ||
| fi | ||
|
|
||
| if [ ! -z "$XHARNESS_CLI_PATH" ]; then | ||
| # When running in CI, we only have the .NET runtime available | ||
| # We need to call the XHarness CLI DLL directly via dotnet exec | ||
| HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH" | ||
| else | ||
| HARNESS_RUNNER="dotnet xharness" | ||
| fi | ||
|
|
||
| if [ "$SCENARIO" == "WasmTestOnBrowser" ]; then | ||
| XHARNESS_COMMAND="test-browser" | ||
| elif [ -z "$XHARNESS_COMMAND" ]; then | ||
| XHARNESS_COMMAND="test" | ||
| fi | ||
|
|
||
| function BuildAOT() | ||
| { | ||
| local projectFile=$1 | ||
| local binLog=$2 | ||
| shift 2 | ||
|
|
||
| time dotnet msbuild $projectFile /bl:$binLog $* | ||
| local buildExitCode=$? | ||
|
|
||
| echo "\n** Performance summary for the build **\n" | ||
| dotnet msbuild $binLog -clp:PerformanceSummary -v:q -nologo | ||
| if [[ "$(uname -s)" == "Linux" && $buildExitCode -ne 0 ]]; then | ||
| echo "\nLast few messages from dmesg:\n" | ||
| dmesg | tail -n 20 | ||
| fi | ||
|
|
||
| echo | ||
| echo | ||
|
|
||
| return $buildExitCode | ||
| } | ||
|
|
||
| # RunCommands defined in tests.mobile.targets | ||
| [[RunCommands]] | ||
|
|
||
| _exitCode=$? | ||
|
|
||
| echo "XHarness artifacts: $XHARNESS_OUT" | ||
|
|
||
| exit $_exitCode |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,12 +38,12 @@ | |
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(BuildAOTTestsOnHelix)' == 'true'"> | ||
| <_AOTBuildCommand>dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog</_AOTBuildCommand> | ||
| <_AOTBuildCommand>BuildAOT publish/ProxyProjectForAOTOnHelix.proj $XHARNESS_OUT/AOTBuild.binlog</_AOTBuildCommand> | ||
|
|
||
| <!-- running aot-helix tests locally, so we can test with the same project file as CI --> | ||
| <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)</_AOTBuildCommand> | ||
|
|
||
| <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation) /p:EmccLinkOptimizationFlag='-Oz -Wl%252C-O0 -Wl%252C-lto-O0'</_AOTBuildCommand> | ||
| <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation)</_AOTBuildCommand> | ||
| <_AOTBuildCommand>$(_AOTBuildCommand) && cd wasm_build/AppBundle</_AOTBuildCommand> | ||
|
|
||
| <RunScriptCommand Condition="'$(RunScriptCommand)' == ''">$(_AOTBuildCommand)</RunScriptCommand> | ||
|
|
@@ -87,9 +87,15 @@ | |
| AssemblyFile="$(WasmBuildTasksAssemblyPath)" /> | ||
|
|
||
| <Target Name="_BundleAOTTestWasmAppForHelix" DependsOnTargets="PrepareForWasmBuildApp"> | ||
| <PropertyGroup Condition="'$(IsHighAotMemoryUsageTest)' == 'true' and '$(ContinuousIntegrationBuild)' == 'true'"> | ||
| <DisableParallelEmccCompile Condition="'$(DisableParallelEmccCompile)' == ''">true</DisableParallelEmccCompile> | ||
| <EmccLinkOptimizationFlag Condition="'$(EmccLinkOptimizationFlag)' == ''">-O2</EmccLinkOptimizationFlag> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity)</_MainAssemblyPath> | ||
| <RuntimeConfigFilePath>$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))</RuntimeConfigFilePath> | ||
| <EmccLinkOptimizationFlag Condition="'$(EmccLinkOptimizationFlag)' == ''">-Oz -Wl%252C-O0 -Wl%252C-lto-O0</EmccLinkOptimizationFlag> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An xml comment (doesn't need to be long) explaining why these specific flags were selected would be great here
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll leave this one for @radekdoulik to add, since he set these originally. |
||
| </PropertyGroup> | ||
|
|
||
| <Error Text="Item WasmAssembliesToBundle is empty. This is likely an authoring error." Condition="@(WasmAssembliesToBundle->Count()) == 0" /> | ||
|
|
@@ -111,15 +117,20 @@ | |
| <!-- To recreate the original project on helix, we need to set the wasm properties also, same as the | ||
| library test project. Eg. $(InvariantGlobalization) --> | ||
| <ItemGroup> | ||
| <_WasmPropertyNames Include="InvariantGlobalization" /> | ||
| <_WasmPropertyNames Include="AOTMode" /> | ||
| <_WasmPropertyNames Include="WasmDebugLevel" /> | ||
| <_WasmPropertyNames Include="AssemblyName" /> | ||
| <_WasmPropertyNames Include="DisableParallelAot" /> | ||
| <_WasmPropertyNames Include="DisableParallelEmccCompile" /> | ||
| <_WasmPropertyNames Include="EmccCompileOptimizationFlag" /> | ||
| <_WasmPropertyNames Include="EmccLinkOptimizationFlag" /> | ||
| <_WasmPropertyNames Include="IncludeSatelliteAssembliesInVFS" /> | ||
| <_WasmPropertyNames Include="InvariantGlobalization" /> | ||
| <_WasmPropertyNames Include="WasmBuildNative" /> | ||
| <_WasmPropertyNames Include="_WasmDevel" /> | ||
| <_WasmPropertyNames Include="WasmLinkIcalls" /> | ||
| <_WasmPropertyNames Include="WasmDebugLevel" /> | ||
| <_WasmPropertyNames Include="WasmDedup" /> | ||
| <_WasmPropertyNames Include="IncludeSatelliteAssembliesInVFS" /> | ||
| <_WasmPropertyNames Include="AssemblyName" /> | ||
| <_WasmPropertyNames Include="WasmLinkIcalls" /> | ||
| <_WasmPropertyNames Include="WasmNativeStrip" /> | ||
| <_WasmPropertyNames Include="_WasmDevel" /> | ||
|
|
||
| <_WasmPropertiesToPass | ||
| Include="$(%(_WasmPropertyNames.Identity))" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to clearly communicate that this is a function defined in a script, and not a command? (Will it work on Windows?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm how about naming it
_buildAOTFunc? or just_buildAOTeven.re:windows, we are not running these on windows yet. And I have a separate PR for that, where I can add the cmd/ps1 equivalent of the new template script.