Skip to content

Commit

Permalink
[browser][icu][libraries] Load full ICU in library tests only when it…
Browse files Browse the repository at this point in the history
…'s necessary (#82619)

* Moved the flag to libs that really need it.

* Remaining libs.

* Property should not be set in ItemsGroup.

* Previos approach did not work, revert and try new one.

* Only placing it here does not trim the assigned value.

* Add comment to the workaround.
  • Loading branch information
ilonatommy authored Mar 1, 2023
1 parent 14bf690 commit b0fa189
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<PropertyGroup>
<IsBrowserWasmProject Condition="'$(IsBrowserWasmProject)' == ''">true</IsBrowserWasmProject>

<!-- some tests require full ICU data, force it for all the tests -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>

<!-- set this when provisioning emsdk on CI -->
<EMSDK_PATH Condition="'$(EMSDK_PATH)' == '' and '$(ContinuousIntegrationBuild)' == 'true' and '$(MonoProjectRoot)' != ''">$([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasm', 'emsdk'))</EMSDK_PATH>

Expand All @@ -35,6 +32,14 @@
<_BundleAOTTestWasmAppForHelixDependsOn>$(_BundleAOTTestWasmAppForHelixDependsOn);PrepareForWasmBuildApp;_PrepareForAOTOnHelix</_BundleAOTTestWasmAppForHelixDependsOn>
</PropertyGroup>

<!-- We expect WASM users to indicate they would like to have bigger download size by adding WasmIncludeFullIcuData, -->
<!-- by default we make their icu small by sharding. -->
<!-- Trimming test InvariantGlobalizationFalse requires full ICU data. -->
<!-- ToDo: edit after https://github.com/dotnet/runtime/issues/82819 is merged -->
<PropertyGroup Condition="'$(TestTrimming)' == 'true'">
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
</PropertyGroup>

<!-- On CI this is installed as part of pretest, but it should still be installed
for WBT, and debugger tests -->
<Import Project="$(MSBuildThisFileDirectory)wasm-provisioning.targets"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'browser'">true</DebuggerSupport>

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<TestRuntime>true</TestRuntime>

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Globalization\CalendarTestBase.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="default.rd.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<EnableLibraryImportGenerator>true</EnableLibraryImportGenerator>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser</TargetFrameworks>

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<!-- Disable nullability public only feature for NullabilityInfoContextTests -->
<Features>$(Features.Replace('nullablePublicOnly', '')</Features>

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>

<!-- The test is looking for debugger attributes we would have stripped with NativeAOT -->
<IlcKeepManagedDebuggerSupport>true</IlcKeepManagedDebuggerSupport>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest> <!-- to avoid OOMs with source generation in wasm: https://github.com/dotnet/runtime/pull/60701 -->

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
</PropertyGroup>
<ItemGroup>
<Compile Include="AttRegexTests.cs" />
Expand Down

0 comments on commit b0fa189

Please sign in to comment.