Skip to content
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

[browser] default WasmDebugLevel to 0 for tests #104361

Merged
merged 5 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="'$(ContinuousIntegrationBuild)' == 'true' and '$(WasmDebugLevel)' == ''">0</WasmDebugLevel>
pavelsavara marked this conversation as resolved.
Show resolved Hide resolved

<TrimMode Condition="'$(TrimMode)' == ''">full</TrimMode>
<JsonSerializerIsReflectionEnabledByDefault Condition="'$(JsonSerializerIsReflectionEnabledByDefault)' == ''">true</JsonSerializerIsReflectionEnabledByDefault>
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