-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Shift Most of Wasm AOT test build to helix #48226
Changes from 126 commits
438d530
4ccf81b
83760ea
0b15afc
adcd026
9003dc3
f2dc5df
3ba7a82
281cb1a
ed324a1
62b9c3e
ed62416
4b6f7cb
03d33c4
e1cd904
7e0661c
4e7c715
573a5e7
cac00aa
06a4738
4f17c4e
c0bb31b
6e7905f
b4482b6
f60f641
21dec7f
1a4028a
50df061
cf14036
4e7ab85
a0eadd8
3deee26
5cc58c6
d79548d
0b4f55a
494123e
54e61db
7594c61
8ad4515
62dee6b
8dee79b
047b2ba
2e1a6ae
9901db0
60b176b
bb36d7c
b1a1d40
7507a81
fa90a91
7c3e7bc
74e8e6e
0ce162b
cec25fa
3503330
78264e5
ca8bf81
373c172
17c2c20
02fb795
37f23c3
27dad5d
40ecc4b
71423cd
948a645
0f3c070
5bd6d01
7b977a4
b859c85
102d583
cc5ca0d
25f2a36
488b2f8
06eabc0
64faaf9
8ad9bdf
79b0f85
009418f
763e91e
a83cf79
a4e5797
2bddacf
cac4de8
6e63861
403c155
2856767
16c2004
ac3f736
0f6f549
7bbb390
717abec
ef06d0d
19d0646
6dd7607
0399ccf
9aea5cf
9f5d10c
4742f4b
b14d0ff
02c3bcb
14f7437
b7c308f
854fb34
e6be69f
73052fd
b753d5e
34105a1
a1cd01c
a741040
867a381
9884055
b09c9cb
79fa75b
0ec0210
f81fde9
f33e181
fec5a71
77184f6
5021fec
da1aca9
ec9255c
29aed77
50dddbb
160f053
17693cd
fcfb527
04e7f99
4f95a05
6bee3b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<linker> | ||
<assembly fullname="TestUtilities"> | ||
<namespace fullname="System" /> | ||
</assembly> | ||
</linker> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,15 @@ | |
<PropertyGroup> | ||
<BundleTestAppTargets>$(BundleTestAppTargets);BundleTestWasmApp</BundleTestAppTargets> | ||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' == 'Debug'">true</DebuggerSupport> | ||
<!-- Some tests expect to load satellite assemblies by path, eg. System.Runtime.Loader.Tests, | ||
so, just setting it true by default --> | ||
<IncludeSatelliteAssembliesInVFS Condition="'$(IncludeSatelliteAssembliesInVFS)' == ''">true</IncludeSatelliteAssembliesInVFS> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<BuildAOTTestsOn Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(Scenario)' == 'BuildWasmApps'">helix</BuildAOTTestsOn> | ||
<BuildAOTTestsOn Condition="'$(BuildAOTTestsOnHelix)' == 'true'">helix</BuildAOTTestsOn> | ||
<BuildAOTTestsOn Condition="'$(BuildAOTTestsOn)' == ''">local</BuildAOTTestsOn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(RunScriptCommand)' == ''"> | ||
|
@@ -14,49 +23,119 @@ | |
|
||
<_XHarnessArgs Condition="'$(Scenario)' != 'WasmTestOnBrowser'">$(_XHarnessArgs) --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js</_XHarnessArgs> | ||
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs> | ||
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != '' and '$(OS)' != 'Windows_NT'">$(_XHarnessArgs) $(WasmXHarnessArgs) %24WasmXHarnessArgs</_XHarnessArgs> | ||
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != '' and '$(OS)' == 'Windows_NT'">$(_XHarnessArgs) $(WasmXHarnessArgs) %WasmXHarnessArgs%</_XHarnessArgs> | ||
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs> | ||
|
||
<_AppArgs Condition="'$(IsFunctionalTest)' != 'true' and '$(Scenario)' != 'BuildWasmApps'">--run WasmTestRunner.dll $(AssemblyName).dll</_AppArgs> | ||
<_AppArgs Condition="'$(IsFunctionalTest)' == 'true'">--run $(AssemblyName).dll --testing</_AppArgs> | ||
|
||
<_AppArgs Condition="'$(WasmTestAppArgs)' != ''">$(_AppArgs) $(WasmTestAppArgs) %24WasmTestAppArgs</_AppArgs> | ||
<RunScriptCommand Condition="'$(OS)' != 'Windows_NT'">$HARNESS_RUNNER $(_XHarnessArgs) -- $(WasmXHarnessMonoArgs) %24WasmXHarnessMonoArgs $(_AppArgs)</RunScriptCommand> | ||
<RunScriptCommand Condition="'$(OS)' == 'Windows_NT'">%HARNESS_RUNNER% $(_XHarnessArgs) -- $(WasmXHarnessMonoArgs) %WasmXHarnessMonoArgs% $(_AppArgs)</RunScriptCommand> | ||
<_AppArgs Condition="'$(WasmTestAppArgs)' != ''">$(_AppArgs) $(WasmTestAppArgs)</_AppArgs> | ||
|
||
<RunScriptCommand Condition="'$(OS)' != 'Windows_NT'">$HARNESS_RUNNER $(_XHarnessArgs) %24WasmXHarnessArgs -- $(WasmXHarnessMonoArgs) %24WasmXHarnessMonoArgs $(_AppArgs) %24WasmTestAppArgs</RunScriptCommand> | ||
<RunScriptCommand Condition="'$(OS)' == 'Windows_NT'">$HARNESS_RUNNER $(_XHarnessArgs) %WasmXHarnessArgs% -- $(WasmXHarnessMonoArgs) %WasmXHarnessMonoArgs% $(_AppArgs) %WasmTestAppArgs%</RunScriptCommand> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(BuildAOTTestsOnHelix)' == 'true'"> | ||
<_AOTBuildCommand>dotnet msbuild publish/AOTTestProjectForHelix.proj /bl:$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)</_AOTBuildCommand> | ||
<_AOTBuildCommand>$(_AOTBuildCommand) && cd wasm_build/AppBundle</_AOTBuildCommand> | ||
|
||
<RunScriptCommand Condition="'$(RunScriptCommand)' == ''">$(_AOTBuildCommand)</RunScriptCommand> | ||
<RunScriptCommand Condition="'$(RunScriptCommand)' != ''">$(_AOTBuildCommand) && $(RunScriptCommand)</RunScriptCommand> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(UseDefaultBlazorWASMFeatureSwitches)' == 'true'"> | ||
<EventSourceSupport>false</EventSourceSupport> | ||
<UseSystemResourceKeys>true</UseSystemResourceKeys> | ||
<UseSystemResourceKeys>false</UseSystemResourceKeys> | ||
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding> | ||
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport> | ||
|
||
<!-- we want to default to what Blazor has, except if we are building in Debug config --> | ||
<DebuggerSupport Condition="'$(Configuration)' != 'Debug'">false</DebuggerSupport> | ||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' != 'Debug'">false</DebuggerSupport> | ||
</PropertyGroup> | ||
Comment on lines
50
to
58
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. Some these need to have values different from what
Setting these only for some library projects makes it kinda inconsistent. And I'm wondering if that affects what the intention of /cc @lewing @akoeplinger 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 agree with @radical, the intention of |
||
|
||
<!-- Don't include InTree.props here, because the test projects themselves can set the target* properties --> | ||
<Import Project="$(MonoProjectRoot)\wasm\build\WasmApp.props" /> | ||
<Import Project="$(MonoProjectRoot)\wasm\build\WasmApp.InTree.targets" /> | ||
<Import Project="$(MonoProjectRoot)\wasm\build\WasmApp.props" | ||
Condition="'$(BuildAOTTestsOn)' == 'local'" /> | ||
<Import Project="$(MonoProjectRoot)\wasm\build\WasmApp.InTree.targets" | ||
Condition="'$(BuildAOTTestsOn)' == 'local'" /> | ||
|
||
<PropertyGroup> | ||
<WasmBuildAppDependsOn>PrepareForWasmBuildApp;$(WasmBuildAppDependsOn)</WasmBuildAppDependsOn> | ||
<EmSdkDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk'))</EmSdkDir> | ||
<EmSdkDirForHelixPayload>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono', 'wasm', 'emsdk'))</EmSdkDirForHelixPayload> | ||
|
||
<BundleTestWasmAppDependsOn Condition="'$(BuildAOTTestsOn)' == 'local'">WasmBuildApp</BundleTestWasmAppDependsOn> | ||
<BundleTestWasmAppDependsOn Condition="'$(BuildAOTTestsOn)' == 'helix'">StageEmSdkForHelix</BundleTestWasmAppDependsOn> | ||
|
||
<BundleTestWasmAppDependsOn Condition="'$(BuildAOTTestsOnHelix)' == 'true'">$(BundleTestWasmAppDependsOn);_BundleAOTTestWasmAppForHelix</BundleTestWasmAppDependsOn> | ||
</PropertyGroup> | ||
|
||
<Target Name="BundleTestWasmApp" DependsOnTargets="WasmBuildApp;StageEmSdkForHelix" /> | ||
<Target Name="BundleTestWasmApp" DependsOnTargets="$(BundleTestWasmAppDependsOn)" /> | ||
|
||
<UsingTask Condition="'$(BuildAOTTestsOnHelix)' == 'true'" | ||
TaskName="Microsoft.WebAssembly.Build.Tasks.GenerateAOTProps" | ||
AssemblyFile="$(WasmBuildTasksAssemblyPath)" /> | ||
|
||
<Target Name="_BundleAOTTestWasmAppForHelix" DependsOnTargets="PrepareForWasmBuildApp"> | ||
<ItemGroup> | ||
<BundleFiles Include="$(WasmMainJSPath)" TargetDir="publish" /> | ||
<BundleFiles Include="@(WasmSatelliteAssemblies)" TargetDir="publish/%(WasmSatelliteAssemblies.CultureName)" /> | ||
<BundleFiles Include="@(WasmAssembliesToBundle)" TargetDir="publish" /> | ||
|
||
<BundleFiles Include="$(MonoProjectRoot)\wasm\data\aot-tests\*" TargetDir="publish" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(DebuggerSupport)' == 'true'"> | ||
<!-- Add any pdb files, if available --> | ||
<_BundlePdbFiles Include="$([System.IO.Path]::ChangeExtension('%(WasmAssembliesToBundle.Identity)', '.pdb'))" /> | ||
<BundleFiles Include="@(_BundlePdbFiles)" TargetDir="publish" Condition="Exists(%(_BundlePdbFiles.Identity))" /> | ||
</ItemGroup> | ||
|
||
<!-- To recreate the original project on helix, we need to set the wasm properties also, same as the | ||
library test project. Eg. $(InvariantGlobalization) --> | ||
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. do we have a way of knowing the list of properties is complete or when we need to update it? 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. Um .. not really. So, when something breaks? I didn't add all the properties either, because I want to do that as it comes up. |
||
<ItemGroup> | ||
<_WasmPropertyNames Include="InvariantGlobalization" /> | ||
<_WasmPropertyNames Include="AOTMode" /> | ||
<_WasmPropertyNames Include="WasmDebugLevel" /> | ||
<_WasmPropertyNames Include="WasmBuildNative" /> | ||
<_WasmPropertyNames Include="_WasmDevel" /> | ||
<_WasmPropertyNames Include="WasmLinkIcalls" /> | ||
<_WasmPropertyNames Include="WasmDedup" /> | ||
<_WasmPropertyNames Include="IncludeSatelliteAssembliesInVFS" /> | ||
|
||
<_WasmPropertiesToPass | ||
Include="$(%(_WasmPropertyNames.Identity))" | ||
Name="%(_WasmPropertyNames.Identity)" | ||
ConditionToUse="%(_WasmPropertyNames.ConditionToUse)" /> | ||
|
||
<_WasmVFSFilesToCopy Include="@(WasmFilesToIncludeInFileSystem)" /> | ||
<_WasmVFSFilesToCopy TargetPath="%(FileName)%(Extension)" Condition="'%(TargetPath)' == ''" /> | ||
</ItemGroup> | ||
|
||
<!-- This file gets imported by the project file on helix --> | ||
<GenerateAOTProps | ||
Properties="@(_WasmPropertiesToPass)" | ||
OutputFile="$(BundleDir)publish\AOTTestProjectForHelix.props" /> | ||
|
||
<Copy SourceFiles="@(BundleFiles)" DestinationFolder="$(BundleDir)%(TargetDir)" /> | ||
<Copy SourceFiles="@(_WasmVFSFilesToCopy)" DestinationFiles="$(BundleDir)\extraFiles\%(_WasmVFSFilesToCopy.TargetPath)" /> | ||
</Target> | ||
|
||
<!-- CI has emscripten provisioned in $(EMSDK_PATH) as `/usr/local/emscripten`. Because helix tasks will | ||
attempt to write a .payload file, we cannot use $(EMSDK_PATH) to package emsdk as a helix correlation | ||
payload. Instead, we copy over the files to a new directory `src/mono/wasm/emsdk` and use that. --> | ||
<Target Name="StageEmSdkForHelix" Condition="'$(Scenario)' == 'BuildWasmApps' and '$(ContinuousIntegrationBuild)' == 'true' and !Exists($(EmSdkDir))"> | ||
<Error Condition="!Exists($(EMSDK_PATH))" Text="Could not find emscripten sdk in $(EmSdkDir) or in EMSDK_PATH=$(EMSDK_PATH)" /> | ||
<Target Name="StageEmSdkForHelix" Condition="'$(EmSdkDirForHelixPayload)' == '' or !Exists($(EmSdkDirForHelixPayload))"> | ||
<Error Condition="'$(EMSDK_PATH)' == '' or !Exists($(EMSDK_PATH))" Text="Could not find emscripten sdk in $(EmSdkDirForHelixPayload) or in EMSDK_PATH=$(EMSDK_PATH)" /> | ||
|
||
<ItemGroup> | ||
<EmSdkFiles Include="$(EMSDK_PATH)\**\*" Exclude="$(EMSDK_PATH)\.git\**\*" /> | ||
</ItemGroup> | ||
|
||
<MakeDir Directories="$(EmSdkDir)" /> | ||
<Copy SourceFiles="@(EmSdkFiles)" DestinationFolder="$(EmSdkDir)\%(RecursiveDir)" /> | ||
<MakeDir Directories="$(EmSdkDirForHelixPayload)" /> | ||
<Copy SourceFiles="@(EmSdkFiles)" DestinationFolder="$(EmSdkDirForHelixPayload)\%(RecursiveDir)" /> | ||
</Target> | ||
|
||
<Target Name="PrepareForWasmBuildApp"> | ||
|
@@ -74,17 +153,30 @@ | |
|
||
<ItemGroup> | ||
<WasmSatelliteAssemblies Include="$(PublishDir)*\*.resources.dll" /> | ||
<WasmSatelliteAssemblies> | ||
<CultureName>$([System.IO.Directory]::GetParent('%(Identity)').Name)</CultureName> | ||
</WasmSatelliteAssemblies> | ||
<WasmSatelliteAssemblies CultureName="$([System.IO.Directory]::GetParent('%(Identity)').Name)" /> | ||
|
||
<WasmAssembliesToBundle Include="$(PublishDir)\*.dll"/> | ||
|
||
<WasmFilesToIncludeInFileSystem Include="@(ContentWithTargetPath)" /> | ||
<WasmFilesToIncludeInFileSystem Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.BuildReference)' == 'true' and !$([System.String]::new('%(ReferenceCopyLocalPaths.Identity)').EndsWith('.resources.dll'))" /> | ||
<WasmFilesToIncludeInFileSystem Include="@(WasmSatelliteAssemblies)" TargetPath="%(WasmSatelliteAssemblies.CultureName)\%(WasmSatelliteAssemblies.Filename)%(WasmSatelliteAssemblies.Extension)" /> | ||
<WasmFilesToIncludeInFileSystem | ||
Include="@(WasmSatelliteAssemblies)" | ||
TargetPath="%(WasmSatelliteAssemblies.CultureName)\%(WasmSatelliteAssemblies.FileName)%(WasmSatelliteAssemblies.Extension)" | ||
Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true'" /> | ||
|
||
<_CopyLocalPaths | ||
Include="@(PublishItemsOutputGroupOutputs)" | ||
Condition="'%(PublishItemsOutputGroupOutputs.BuildReference)' == 'true' and | ||
!$([System.String]::new('%(PublishItemsOutputGroupOutputs.Identity)').EndsWith('.resources.dll'))" /> | ||
|
||
<_CopyLocalPaths TargetPath="%(_CopyLocalPaths.RelativePath)" Condition="'%(_CopyLocalPaths.RelativePath)' != ''" /> | ||
<_CopyLocalPaths TargetPath="%(FileName)%(Extension)" Condition="'%(_CopyLocalPaths.RelativePath)' == ''" /> | ||
<WasmFilesToIncludeInFileSystem Include="@(_CopyLocalPaths)" /> | ||
|
||
<!-- Include files specified by test projects from publish dir --> | ||
<WasmFilesToIncludeInFileSystem Include="@(WasmFilesToIncludeFromPublishDir -> '$(PublishDir)%(Identity)')" /> | ||
<WasmFilesToIncludeInFileSystem | ||
Include="$(PublishDir)%(WasmFilesToIncludeFromPublishDir.Identity)" | ||
TargetPath="%(WasmFilesToIncludeFromPublishDir.Identity)" | ||
Condition="'%(WasmFilesToIncludeFromPublishDir.Identity)' != ''" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
<PropertyGroup> | ||
<IncludeRemoteExecutor>true</IncludeRemoteExecutor> | ||
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport> | ||
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. curious why does this need .pdb? 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. Eg:
|
||
</PropertyGroup> | ||
<ItemGroup> | ||
<!-- Common Collections tests --> | ||
|
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.
@steveisok @mdh1418 Do you know why this change was made?
main
is still using the older version.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.
judging from the date it's to bring in dotnet/dotnet-buildtools-prereqs-docker@f25f6cd