From e2e933603c20bcc1b5df06edbabb9e7c85c186f4 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Fri, 19 Nov 2021 15:52:45 +0100 Subject: [PATCH 1/9] xharness bump --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3ab3433285362..0961dbd1d26ee 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.21561.1", + "version": "1.0.0-prerelease.21569.5", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9365e67fda4b5..0c802c11657fd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -202,13 +202,13 @@ https://github.com/dotnet/linker f2dd65f51f6096f25e00e0d1e4c6af0e85d41865 - + https://github.com/dotnet/xharness - 42da0d206c22393c081abc4b6a48a181e17bb372 + a584ca98ef56413e7aa3e3f214137068df3859c9 - + https://github.com/dotnet/xharness - 42da0d206c22393c081abc4b6a48a181e17bb372 + a584ca98ef56413e7aa3e3f214137068df3859c9 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 4fbee001c46cc..46269eb6d7472 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -154,8 +154,8 @@ 1.0.1-prerelease-00006 16.9.0-preview-20201201-01 - 1.0.0-prerelease.21561.1 - 1.0.0-prerelease.21561.1 + 1.0.0-prerelease.21569.5 + 1.0.0-prerelease.21569.5 1.0.2-alpha.0.21558.2 2.4.2-pre.9 2.4.2 From 5102ad21efade2fc81c40a319c23825d50dc620f Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Wed, 17 Nov 2021 08:21:36 +0100 Subject: [PATCH 2/9] run full matrix build --- eng/pipelines/common/xplat-setup.yml | 2 +- eng/pipelines/runtime-staging.yml | 2 +- eng/pipelines/runtime.yml | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 1c7d6490df5f6..2495dbdef4eb2 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -50,7 +50,7 @@ jobs: value: $(buildConfigUpper) - name: _runSmokeTestsOnlyArg - value: '/p:RunSmokeTestsOnly=$(isNotManualAndIsPR)' + value: '' - ${{ if or(eq(parameters.osGroup, 'windows'), eq(parameters.hostedOs, 'windows')) }}: - name: archiveExtension value: '.zip' diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 9dce643f1a3ac..0731a9e70891a 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -106,7 +106,7 @@ jobs: eq(variables['librariesContainsChange'], true), eq(variables['monoContainsChange'], true), eq(variables['isManualOrIsNotPR'], true), - eq(variables['isFullMatrix'], true)) + eq(true, true)) # # MacCatalyst interp - requires AOT Compilation and Interp flags diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 770d9c1de4cda..33081c9c70576 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -328,9 +328,7 @@ jobs: buildConfig: Release runtimeFlavor: mono platforms: - # BuildWasmApps should only happen on the rolling build. No need to duplicate the build on PR's - - ${{ if eq(variables['isFullMatrix'], true) }}: - - Browser_wasm + - Browser_wasm variables: # map dependencies variables to local variables - name: monoContainsChange @@ -493,8 +491,8 @@ jobs: nameSuffix: AllSubsets_Mono_RuntimeTests buildArgs: -s mono+libs -c $(_BuildConfig) timeoutInMinutes: 180 - condition: >- - eq(variables['isFullMatrix'], true) + #condition: >- + # eq(variables['isFullMatrix'], true) # NOTE: Per PR test execution is not recommended for mobile runtime tests # extra steps, run tests extraStepsTemplate: /eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml From cd2a2d47d935b972be7c4d46e22dc5e2feac5a14 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Sat, 20 Nov 2021 22:47:44 +0100 Subject: [PATCH 3/9] Revert "run full matrix build" This reverts commit 5102ad21efade2fc81c40a319c23825d50dc620f. --- eng/pipelines/common/xplat-setup.yml | 2 +- eng/pipelines/runtime-staging.yml | 2 +- eng/pipelines/runtime.yml | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 2495dbdef4eb2..1c7d6490df5f6 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -50,7 +50,7 @@ jobs: value: $(buildConfigUpper) - name: _runSmokeTestsOnlyArg - value: '' + value: '/p:RunSmokeTestsOnly=$(isNotManualAndIsPR)' - ${{ if or(eq(parameters.osGroup, 'windows'), eq(parameters.hostedOs, 'windows')) }}: - name: archiveExtension value: '.zip' diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 0731a9e70891a..9dce643f1a3ac 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -106,7 +106,7 @@ jobs: eq(variables['librariesContainsChange'], true), eq(variables['monoContainsChange'], true), eq(variables['isManualOrIsNotPR'], true), - eq(true, true)) + eq(variables['isFullMatrix'], true)) # # MacCatalyst interp - requires AOT Compilation and Interp flags diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 33081c9c70576..770d9c1de4cda 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -328,7 +328,9 @@ jobs: buildConfig: Release runtimeFlavor: mono platforms: - - Browser_wasm + # BuildWasmApps should only happen on the rolling build. No need to duplicate the build on PR's + - ${{ if eq(variables['isFullMatrix'], true) }}: + - Browser_wasm variables: # map dependencies variables to local variables - name: monoContainsChange @@ -491,8 +493,8 @@ jobs: nameSuffix: AllSubsets_Mono_RuntimeTests buildArgs: -s mono+libs -c $(_BuildConfig) timeoutInMinutes: 180 - #condition: >- - # eq(variables['isFullMatrix'], true) + condition: >- + eq(variables['isFullMatrix'], true) # NOTE: Per PR test execution is not recommended for mobile runtime tests # extra steps, run tests extraStepsTemplate: /eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml From 35aa5c2d29feeaf47850063b09ea33b754e4bd17 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Sat, 20 Nov 2021 23:27:16 +0100 Subject: [PATCH 4/9] more logging --- src/mono/wasm/test-main.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index cf7b7e39f349f..1cde6057ed432 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -23,6 +23,7 @@ const originalConsole = { }; let isXUnitDoneCheck = false; +let isXmlDoneCheck = false; function proxyMethod(prefix, func, asJson) { return function () { @@ -42,7 +43,12 @@ function proxyMethod(prefix, func, asJson) { isXUnitDoneCheck = true; } - if (asJson) { + if (payload.length > 500 && payload.indexOf("STARTRESULTXML") !== -1) { + originalConsole.log('Sending RESULTXML') + isXmlDoneCheck = true; + func(payload); + } + else if (asJson) { func(JSON.stringify({ method: prefix, payload: payload, @@ -66,10 +72,12 @@ function proxyJson(func) { console[m] = proxyMethod(`console.${m}`, func, true); } +let consoleWebSocket; + if (is_browser) { const consoleUrl = `${window.location.origin}/console`.replace('http://', 'ws://'); - let consoleWebSocket = new WebSocket(consoleUrl); + consoleWebSocket = new WebSocket(consoleUrl); // redirect output so that when emscripten starts it's already redirected proxyJson(function (msg) { if (consoleWebSocket.readyState === WebSocket.OPEN) { @@ -238,7 +246,7 @@ function set_exit_code(exit_code, reason) { } if (is_browser) { const stack = (new Error()).stack.replace(/\n/g, "").replace(/[ ]*at/g, " at").replace(/https?:\/\/[0-9.:]*/g, "").replace("Error", ""); - const messsage = `Exit called with ${exit_code} when isXUnitDoneCheck=${isXUnitDoneCheck} ${stack}.`; + const messsage = `Exit called with ${exit_code} when isXUnitDoneCheck=${isXUnitDoneCheck} isXmlDoneCheck=${isXmlDoneCheck} ${stack}.`; // Notify the selenium script Module.exit_code = exit_code; @@ -258,8 +266,11 @@ function set_exit_code(exit_code, reason) { console.log("Flushed stdout!"); console.log('1 ' + messsage); + console.log("1 consoleWebSocket.bufferedAmount: " + consoleWebSocket.bufferedAmount); setTimeout(() => { originalConsole.log('2 ' + messsage); + console.log("2 consoleWebSocket.bufferedAmount: " + consoleWebSocket.bufferedAmount); + // tell xharness WasmTestMessagesProcessor we are done. console.log("WASM EXIT " + exit_code); }, 100); From aaa33c5a582b338d55ce914f20461d96075a552d Mon Sep 17 00:00:00 2001 From: Pavel Savara Date: Mon, 22 Nov 2021 10:32:49 +0100 Subject: [PATCH 5/9] latest xharness --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 0961dbd1d26ee..6f669656d8572 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.21569.5", + "version": "1.0.0-prerelease.21572.1", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0c802c11657fd..6874041115487 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -202,13 +202,13 @@ https://github.com/dotnet/linker f2dd65f51f6096f25e00e0d1e4c6af0e85d41865 - + https://github.com/dotnet/xharness - a584ca98ef56413e7aa3e3f214137068df3859c9 + ce11017eeda6622405543e33259a1ec7f75c14ba - + https://github.com/dotnet/xharness - a584ca98ef56413e7aa3e3f214137068df3859c9 + ce11017eeda6622405543e33259a1ec7f75c14ba https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 46269eb6d7472..e5bfff8ae30aa 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -154,8 +154,8 @@ 1.0.1-prerelease-00006 16.9.0-preview-20201201-01 - 1.0.0-prerelease.21569.5 - 1.0.0-prerelease.21569.5 + 1.0.0-prerelease.21572.1 + 1.0.0-prerelease.21572.1 1.0.2-alpha.0.21558.2 2.4.2-pre.9 2.4.2 From 0441f115a4911bc39bee7454bd04b009f65adb26 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Mon, 22 Nov 2021 16:22:20 +0100 Subject: [PATCH 6/9] latest xharness --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- src/mono/wasm/test-main.js | 26 ++++++++++++-------------- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 6f669656d8572..18f4e3da0e9c3 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.21572.1", + "version": "1.0.0-prerelease.21572.4", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6874041115487..e0ab2225feecc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -202,13 +202,13 @@ https://github.com/dotnet/linker f2dd65f51f6096f25e00e0d1e4c6af0e85d41865 - + https://github.com/dotnet/xharness - ce11017eeda6622405543e33259a1ec7f75c14ba + 7aa4d338b58a2b21974933802bd731a64c36c1d8 - + https://github.com/dotnet/xharness - ce11017eeda6622405543e33259a1ec7f75c14ba + 7aa4d338b58a2b21974933802bd731a64c36c1d8 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index e5bfff8ae30aa..74ab5f99c3ce7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -154,8 +154,8 @@ 1.0.1-prerelease-00006 16.9.0-preview-20201201-01 - 1.0.0-prerelease.21572.1 - 1.0.0-prerelease.21572.1 + 1.0.0-prerelease.21572.4 + 1.0.0-prerelease.21572.4 1.0.2-alpha.0.21558.2 2.4.2-pre.9 2.4.2 diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index 1cde6057ed432..81aadfe09bc03 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -257,23 +257,21 @@ function set_exit_code(exit_code, reason) { tests_done_elem.innerHTML = exit_code.toString(); document.body.appendChild(tests_done_elem); - // need to flush streams (stdout/stderr) - for (const stream of Module.FS.streams) { - if (stream && stream.stream_ops && stream.stream_ops.flush) { - stream.stream_ops.flush(stream); - } - } - console.log("Flushed stdout!"); - console.log('1 ' + messsage); + originalConsole.log('2 ' + messsage); console.log("1 consoleWebSocket.bufferedAmount: " + consoleWebSocket.bufferedAmount); - setTimeout(() => { - originalConsole.log('2 ' + messsage); - console.log("2 consoleWebSocket.bufferedAmount: " + consoleWebSocket.bufferedAmount); + const stop_when_ws_buffer_empty = () => { + if (consoleWebSocket.bufferedAmount == 0) { + // tell xharness WasmTestMessagesProcessor we are done. + // note this sends last we bytes into the same WS + console.log("WASM EXIT " + exit_code); + } + else { + setTimeout(stop_when_ws_buffer_empty, 100); + } + }; + stop_when_ws_buffer_empty(); - // tell xharness WasmTestMessagesProcessor we are done. - console.log("WASM EXIT " + exit_code); - }, 100); } else if (INTERNAL) { INTERNAL.mono_wasm_exit(exit_code); } From 9b42b19c776ff3b66ebb458bcc25aa0ee8c945cd Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Tue, 23 Nov 2021 08:58:51 +0100 Subject: [PATCH 7/9] feedback --- src/mono/wasm/test-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index 81aadfe09bc03..15b12e4b4b5d0 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -43,7 +43,7 @@ function proxyMethod(prefix, func, asJson) { isXUnitDoneCheck = true; } - if (payload.length > 500 && payload.indexOf("STARTRESULTXML") !== -1) { + if (payload.startsWith("STARTRESULTXML")) { originalConsole.log('Sending RESULTXML') isXmlDoneCheck = true; func(payload); From 6c65c3313a785a9259b26c657683f43622633b94 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Tue, 23 Nov 2021 09:12:54 +0100 Subject: [PATCH 8/9] feedback --- src/mono/wasm/test-main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index 15b12e4b4b5d0..f844c9adb18d8 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -246,7 +246,7 @@ function set_exit_code(exit_code, reason) { } if (is_browser) { const stack = (new Error()).stack.replace(/\n/g, "").replace(/[ ]*at/g, " at").replace(/https?:\/\/[0-9.:]*/g, "").replace("Error", ""); - const messsage = `Exit called with ${exit_code} when isXUnitDoneCheck=${isXUnitDoneCheck} isXmlDoneCheck=${isXmlDoneCheck} ${stack}.`; + const messsage = `Exit called with ${exit_code} when isXUnitDoneCheck=${isXUnitDoneCheck} isXmlDoneCheck=${isXmlDoneCheck} WS.bufferedAmount=${consoleWebSocket.bufferedAmount} ${stack}.`; // Notify the selenium script Module.exit_code = exit_code; @@ -257,9 +257,8 @@ function set_exit_code(exit_code, reason) { tests_done_elem.innerHTML = exit_code.toString(); document.body.appendChild(tests_done_elem); - console.log('1 ' + messsage); - originalConsole.log('2 ' + messsage); - console.log("1 consoleWebSocket.bufferedAmount: " + consoleWebSocket.bufferedAmount); + console.log('WS: ' + messsage); + originalConsole.log('CDP: ' + messsage); const stop_when_ws_buffer_empty = () => { if (consoleWebSocket.bufferedAmount == 0) { // tell xharness WasmTestMessagesProcessor we are done. From fea2803377393c2609e9a9524b244bb7a9ef8baa Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Tue, 23 Nov 2021 09:16:22 +0100 Subject: [PATCH 9/9] typo --- src/mono/wasm/test-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index f844c9adb18d8..8ef7f699b10ea 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -262,7 +262,7 @@ function set_exit_code(exit_code, reason) { const stop_when_ws_buffer_empty = () => { if (consoleWebSocket.bufferedAmount == 0) { // tell xharness WasmTestMessagesProcessor we are done. - // note this sends last we bytes into the same WS + // note this sends last few bytes into the same WS console.log("WASM EXIT " + exit_code); } else {