Skip to content

Commit

Permalink
[browser] default WasmDebugLevel to 0 for tests (#104361)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara authored Jul 4, 2024
1 parent a8616d9 commit dd6840d
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 59 deletions.
10 changes: 0 additions & 10 deletions eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,6 @@
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>

<WasmNativeDebugSymbols Condition="'$(DebuggerSupport)' == 'true' and '$(WasmNativeDebugSymbols)' == ''">true</WasmNativeDebugSymbols>
<!--
Do this *after* importing BrowserWasmApp.targets. tests.wasm.targets sets this to `reset-to-zero` to indicate
that we want to force this value to zero.
BrowserWasmApp.targets *overrides* `WasmDebugLevel` when `DebuggerSupport=true`, but for the library tests
we explicitly want to:
1. build with DebuggerSupport=true so the debugger attributes are preserved by the linker;
2. *debugging* is disabled at run time so the interpreter optimizations don't get disabled.
-->
<WasmDebugLevel Condition="'$(WasmDebugLevel)' == 'reset-to-zero'">0</WasmDebugLevel>
</PropertyGroup>

<ItemGroup Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true' and '$(BuildAOTTestsOnHelix)' != 'true'">
Expand Down
10 changes: 0 additions & 10 deletions eng/testing/tests.wasi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,6 @@
<WasmInvariantGlobalization>$(InvariantGlobalization)</WasmInvariantGlobalization>

<WasmNativeDebugSymbols Condition="'$(DebuggerSupport)' == 'true' and '$(WasmNativeDebugSymbols)' == ''">true</WasmNativeDebugSymbols>
<!--
Do this *after* importing BrowserWasmApp.targets. tests.wasm.targets sets this to `reset-to-zero` to indicate
that we want to force this value to zero.
BrowserWasmApp.targets *overrides* `WasmDebugLevel` when `DebuggerSupport=true`, but for the library tests
we explicitly want to:
1. build with DebuggerSupport=true so the debugger attributes are preserved by the linker;
2. *debugging* is disabled at run time so the interpreter optimizations don't get disabled.
-->
<WasmDebugLevel Condition="'$(WasmDebugLevel)' == 'reset-to-zero'">0</WasmDebugLevel>
</PropertyGroup>

<ItemGroup Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true' and '$(BuildAOTTestsOnHelix)' != 'true'">
Expand Down
5 changes: 1 addition & 4 deletions eng/testing/tests.wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
But we do want to set it for Configuration=Debug .
-->
<WasmDebugLevel Condition="'$(Configuration)' == 'Debug' and '$(WasmDebugLevel)' == ''">-1</WasmDebugLevel>
<!-- We want to have WasmDebugLevel=0, but if DebuggerSupport=true then BrowserWasmApp.targets
*will* override it. So, set this to "reset-to-zero" here, and reset the value later
in targets. -->
<WasmDebugLevel Condition="'$(DebuggerSupport)' == 'true' and '$(ContinuousIntegrationBuild)' == 'true' and '$(WasmDebugLevel)' == ''">reset-to-zero</WasmDebugLevel>
<WasmDebugLevel Condition="'$(WasmDebugLevel)' == ''">0</WasmDebugLevel>

<TrimMode Condition="'$(TrimMode)' == ''">full</TrimMode>
<JsonSerializerIsReflectionEnabledByDefault Condition="'$(JsonSerializerIsReflectionEnabledByDefault)' == ''">true</JsonSerializerIsReflectionEnabledByDefault>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and ('$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi')">true</DebuggerSupport>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
</PropertyGroup>

<ItemGroup>
<RdXmlFile Include="default.rd.xml" />
</ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions src/libraries/System.Memory/tests/System.Memory.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
</PropertyGroup>

<ItemGroup>
<RdXmlFile Include="default.rd.xml" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<!-- This WASM test is slow on NodeJS. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
<TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
<WasmXHarnessMaxParallelThreads>1</WasmXHarnessMaxParallelThreads>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
<Features>$(Features.Replace('nullablePublicOnly', '')</Features>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
<WasmXHarnessMaxParallelThreads>1</WasmXHarnessMaxParallelThreads>
</PropertyGroup>
<ItemGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
Expand Down
18 changes: 1 addition & 17 deletions src/libraries/sendtohelix-browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,7 @@
<PayloadArchive>%(Identity)</PayloadArchive>
<Command>$(HelixCommand)</Command>
<Timeout>$(_workItemTimeout)</Timeout>
<!--
These WASM tests are problematic and slow right now, in this section it's about nodejs and chrome.
Below is same section for V8. There is also Xharness timeout override in the test project.
-->
<Timeout Condition="'%(FileName)' == 'System.Text.Json.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Collections.Immutable.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Net.WebSockets.Client.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Net.Http.Functional.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Memory.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Private.Xml.Tests'">01:20:00</Timeout>
<Timeout Condition="'$(Scenario)' == 'WasmTestOnNodeJS' and '%(FileName)' == 'System.Net.Http.Functional.Tests'">01:20:00</Timeout>
</HelixWorkItem>
</ItemGroup>

Expand All @@ -277,13 +268,6 @@
<PayloadArchive>%(Identity)</PayloadArchive>
<Command>$(HelixCommand)</Command>
<Timeout>$(_workItemTimeout)</Timeout>
<!-- These WASM tests are problematic and slow right now, in this section it's about V8. Above is same section for nodejs and chrome -->
<Timeout Condition="'%(FileName)' == 'System.Text.Json.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Collections.Immutable.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Net.WebSockets.Client.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Net.Http.Functional.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Memory.Tests'">01:20:00</Timeout>
<Timeout Condition="'%(FileName)' == 'System.Private.Xml.Tests'">01:20:00</Timeout>
</HelixWorkItem>

</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/test-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ async function run() {
const main_assembly_name = runArgs.applicationArguments[1];
const app_args = runArgs.applicationArguments.slice(2);
const result = await App.runtime.runMain(main_assembly_name, app_args);
console.log(`test-main.js exiting ${app_args.length > 1 ? main_assembly_name + " " + app_args[0] : main_assembly_name} with result ${result}`);
console.log(`test-main.js exiting ${app_args.length > 1 ? main_assembly_name + " " + app_args[0] : main_assembly_name} with result ${result} and linear memory ${App.runtime.Module.HEAPU8.length} bytes`);
mono_exit(result);
} catch (error) {
if (error.name != "ExitStatus") {
Expand Down

0 comments on commit dd6840d

Please sign in to comment.