diff --git a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index e15f88b3c36900..6bf74ea597ce70 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -7,9 +7,6 @@ $(DefineConstants);NETSTANDARD false - - - $(WasmXHarnessMonoArgs) --no-memory-snapshot @@ -18,6 +15,8 @@ $(TestArchiveRoot)browserornodejs/ $(TestArchiveTestsRoot)$(OSPlatformConfig)/ $(DefineConstants);TARGET_BROWSER + --setenv=XHARNESS_LOG_TEST_START=true --no-memory-snapshot + 00:45:00 diff --git a/src/mono/wasm/runtime/logging.ts b/src/mono/wasm/runtime/logging.ts index a4420b01f57f5f..9e3bef14fa4792 100644 --- a/src/mono/wasm/runtime/logging.ts +++ b/src/mono/wasm/runtime/logging.ts @@ -131,8 +131,18 @@ export function setup_proxy_console(id: string, console: Console, origin: string } } - if (typeof payload === "string" && id !== "main") - payload = `[${id}] ${payload}`; + if (typeof payload === "string") { + if (payload[0] == "[") { + const now = new Date().toISOString(); + if (id !== "main") { + payload = `[${id}][${now}] ${payload}`; + } else { + payload = `[${now}] ${payload}`; + } + } else if (id !== "main") { + payload = `[${id}] ${payload}`; + } + } if (asJson) { func(JSON.stringify({ diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index 3d835c0bb61407..475163ecfe5c0a 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -25,12 +25,12 @@ if (is_node && process.versions.node.split(".")[0] < 14) { if (is_node) { // the emscripten 3.1.34 stopped handling these when MODULARIZE is enabled - process.on('uncaughtException', function(ex) { + process.on('uncaughtException', function (ex) { // ignore UnhandledPromiseRejection exceptions with exit status if (ex !== 'unwind' && (ex.name !== "UnhandledPromiseRejection" || !ex.message.includes('"#"'))) { - throw ex; + throw ex; } - }); + }); } if (!is_node && !is_browser && typeof globalThis.crypto === 'undefined') { @@ -387,6 +387,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}`); mono_exit(result); } catch (error) { if (error.name != "ExitStatus") {