Skip to content

Commit dd6840d

Browse files
authored
[browser] default WasmDebugLevel to 0 for tests (#104361)
1 parent a8616d9 commit dd6840d

File tree

11 files changed

+4
-59
lines changed

11 files changed

+4
-59
lines changed

eng/testing/tests.browser.targets

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,6 @@
173173
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>
174174

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

188178
<ItemGroup Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true' and '$(BuildAOTTestsOnHelix)' != 'true'">

eng/testing/tests.wasi.targets

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,6 @@
9494
<WasmInvariantGlobalization>$(InvariantGlobalization)</WasmInvariantGlobalization>
9595

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

10999
<ItemGroup Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true' and '$(BuildAOTTestsOnHelix)' != 'true'">

eng/testing/tests.wasm.targets

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
But we do want to set it for Configuration=Debug .
1616
-->
1717
<WasmDebugLevel Condition="'$(Configuration)' == 'Debug' and '$(WasmDebugLevel)' == ''">-1</WasmDebugLevel>
18-
<!-- We want to have WasmDebugLevel=0, but if DebuggerSupport=true then BrowserWasmApp.targets
19-
*will* override it. So, set this to "reset-to-zero" here, and reset the value later
20-
in targets. -->
21-
<WasmDebugLevel Condition="'$(DebuggerSupport)' == 'true' and '$(ContinuousIntegrationBuild)' == 'true' and '$(WasmDebugLevel)' == ''">reset-to-zero</WasmDebugLevel>
18+
<WasmDebugLevel Condition="'$(WasmDebugLevel)' == ''">0</WasmDebugLevel>
2219

2320
<TrimMode Condition="'$(TrimMode)' == ''">full</TrimMode>
2421
<JsonSerializerIsReflectionEnabledByDefault Condition="'$(JsonSerializerIsReflectionEnabledByDefault)' == ''">true</JsonSerializerIsReflectionEnabledByDefault>

src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and ('$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi')">true</DebuggerSupport>
66
</PropertyGroup>
77

8-
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
9-
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
10-
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
11-
</PropertyGroup>
12-
138
<ItemGroup>
149
<RdXmlFile Include="default.rd.xml" />
1510
</ItemGroup>

src/libraries/System.Memory/tests/System.Memory.Tests.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
77
</PropertyGroup>
88

9-
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
10-
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
11-
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
12-
</PropertyGroup>
13-
149
<ItemGroup>
1510
<RdXmlFile Include="default.rd.xml" />
1611
</ItemGroup>

src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
2525
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
2626
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
27-
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
27+
<!-- This WASM test is slow on NodeJS. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
2828
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
2929
</PropertyGroup>
3030

src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
1414
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
1515
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
16-
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
17-
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
1816
<WasmXHarnessMaxParallelThreads>1</WasmXHarnessMaxParallelThreads>
1917
</PropertyGroup>
2018

src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
<TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
1515
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
1616
<DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
17-
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
18-
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
1917
</PropertyGroup>
2018

2119
<ItemGroup>

src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
<Features>$(Features.Replace('nullablePublicOnly', '')</Features>
2424
</PropertyGroup>
2525
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
26-
<!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
27-
<WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
2826
<WasmXHarnessMaxParallelThreads>1</WasmXHarnessMaxParallelThreads>
2927
</PropertyGroup>
3028
<ItemGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">

src/libraries/sendtohelix-browser.targets

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,7 @@
242242
<PayloadArchive>%(Identity)</PayloadArchive>
243243
<Command>$(HelixCommand)</Command>
244244
<Timeout>$(_workItemTimeout)</Timeout>
245-
<!--
246-
These WASM tests are problematic and slow right now, in this section it's about nodejs and chrome.
247-
Below is same section for V8. There is also Xharness timeout override in the test project.
248-
-->
249-
<Timeout Condition="'%(FileName)' == 'System.Text.Json.Tests'">01:20:00</Timeout>
250-
<Timeout Condition="'%(FileName)' == 'System.Collections.Immutable.Tests'">01:20:00</Timeout>
251-
<Timeout Condition="'%(FileName)' == 'System.Net.WebSockets.Client.Tests'">01:20:00</Timeout>
252-
<Timeout Condition="'%(FileName)' == 'System.Net.Http.Functional.Tests'">01:20:00</Timeout>
253-
<Timeout Condition="'%(FileName)' == 'System.Memory.Tests'">01:20:00</Timeout>
254-
<Timeout Condition="'%(FileName)' == 'System.Private.Xml.Tests'">01:20:00</Timeout>
245+
<Timeout Condition="'$(Scenario)' == 'WasmTestOnNodeJS' and '%(FileName)' == 'System.Net.Http.Functional.Tests'">01:20:00</Timeout>
255246
</HelixWorkItem>
256247
</ItemGroup>
257248

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

289273
</ItemGroup>

src/mono/browser/test-main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ async function run() {
368368
const main_assembly_name = runArgs.applicationArguments[1];
369369
const app_args = runArgs.applicationArguments.slice(2);
370370
const result = await App.runtime.runMain(main_assembly_name, app_args);
371-
console.log(`test-main.js exiting ${app_args.length > 1 ? main_assembly_name + " " + app_args[0] : main_assembly_name} with result ${result}`);
371+
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`);
372372
mono_exit(result);
373373
} catch (error) {
374374
if (error.name != "ExitStatus") {

0 commit comments

Comments
 (0)