From ccb26859ac99b528db385d5639ef1b063a938304 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Wed, 17 Feb 2021 15:28:12 -0800 Subject: [PATCH 01/13] Adding browser-wasm trimming test leg --- eng/pipelines/common/platform-matrix.yml | 2 +- eng/pipelines/runtime-linker-tests.yml | 1 + .../linker/SupportFiles/Directory.Build.props | 1 + .../SupportFiles/Directory.Build.targets | 19 +++++++++++++++ eng/testing/linker/project.csproj.template | 7 ++++++ eng/testing/linker/trimmingTests.targets | 24 +++++++++++++++---- eng/testing/tests.mobile.targets | 2 +- ...ensions.Logging.Console.TrimmingTests.proj | 4 +++- ...System.Net.HttpListener.TrimmingTests.proj | 3 +++ .../System.Runtime.TrimmingTests.proj | 2 +- ...Cryptography.Algorithms.TrimmingTests.proj | 4 +++- ...curity.Cryptography.Csp.TrimmingTests.proj | 4 +++- 12 files changed, 62 insertions(+), 11 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 75df52b660a36e..91e20974492f2f 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -193,7 +193,7 @@ jobs: targetRid: browser-wasm platform: Browser_wasm container: - image: ubuntu-18.04-webassembly-20210111135621-8ac9b02 + image: ubuntu-18.04-webassembly-20210217201218-6f4d99e registry: mcr jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index 729cb177847a70..946e569f9be9a0 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -57,6 +57,7 @@ jobs: - windows_x64 - OSX_x64 - Linux_x64 + - Browser_wasm jobParameters: testGroup: innerloop timeoutInMinutes: 120 diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props index 9065d7b0b97bcd..97a10a2c6a2c38 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.props +++ b/eng/testing/linker/SupportFiles/Directory.Build.props @@ -1,6 +1,7 @@ true + true link false true diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 3f5aefa6baf1f8..5362f6426f8cb4 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -1,4 +1,6 @@ + + @@ -29,4 +31,21 @@ + + + + + + + + + + + + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle')) + project.dll + + diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index 6bf7c0172a586b..c53467440779de 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -2,6 +2,13 @@ Exe + {MonoAOTCompilerDir} + {MonoProjectRoot} + {MonoAOTCompilerTasksAssemblyPath} + {WasmAppBuilderTasksAssemblyPath} + {ILLinkTasksAssembly} + {MicrosoftNetCoreAppRuntimePackRidDir} + {RepositoryEngineeringDir} {NetCoreAppCurrent} {RuntimeIdentifier} {RuntimePackDir} diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 874204667fae57..45a71288bef198 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -29,8 +29,10 @@ %(ProjectDir)project.csproj - $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish', 'project')) - $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish')) + $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish', 'project')) + $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'AppBundle', 'run-v8.sh')) + $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish')) + $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'AppBundle')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.runtime.%(TestRuntimeIdentifier)', '$(Configuration)')) @@ -76,7 +78,14 @@ .Replace('{RuntimeIdentifier}','%(TestConsoleApps.TestRuntimeIdentifier)') .Replace('{MicrosoftNETILLinkTasksVersion}', '$(MicrosoftNETILLinkTasksVersion)') .Replace('{ExtraTrimmerArgs}', '%(TestConsoleApps.ExtraTrimmerArgs)') - .Replace('{AdditionalProjectReferences}', '$(_additionalProjectReferencesString)'))" + .Replace('{AdditionalProjectReferences}', '$(_additionalProjectReferencesString)') + .Replace('{RepositoryEngineeringDir}', '$(RepositoryEngineeringDir)') + .Replace('{MonoAOTCompilerDir}', '$(MonoAOTCompilerDir)') + .Replace('{MonoProjectRoot}', '$(MonoProjectRoot)') + .Replace('{MonoAOTCompilerTasksAssemblyPath}', '$(MonoAOTCompilerTasksAssemblyPath)') + .Replace('{WasmAppBuilderTasksAssemblyPath}', '$(WasmAppBuilderTasksAssemblyPath)') + .Replace('{ILLinkTasksAssembly}', '$(ILLinkTasksAssembly)') + .Replace('{MicrosoftNetCoreAppRuntimePackRidDir}', '$(MicrosoftNetCoreAppRuntimePackRidDir)'))" Overwrite="true" /> @@ -88,12 +97,17 @@ + + + <_TrimmedProjectsPublishTargets>Publish + <_TrimmedProjectsPublishTargets Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'">$(_TrimmedProjectsPublishTargets);BundleTestWasmApp + @@ -108,7 +122,7 @@ - + diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 74f4b64e1dd6e7..90df033394b3b4 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -245,5 +245,5 @@ AfterTargets="Build" DependsOnTargets="Publish;BundleTestAppleApp;BundleTestAndroidApp;BundleTestWasmApp;ArchiveTests" /> - + diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj index 353b9d16635aca..c227b753f7037b 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj @@ -6,7 +6,9 @@ - + + browser-wasm + diff --git a/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj b/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj index 2ab8b1999b438e..8bcfd0866b8d11 100644 --- a/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj +++ b/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj @@ -4,12 +4,15 @@ CookieExtensionsTest.Helper.cs + browser-wasm CookieExtensionsTest.Helper.cs + browser-wasm CookieExtensionsTest.Helper.cs + browser-wasm diff --git a/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj b/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj index 80a1996c9b37f4..a47113c347f5a2 100644 --- a/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj +++ b/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj @@ -4,7 +4,7 @@ - osx-x64;linux-x64 + osx-x64;linux-x64;browser-wasm diff --git a/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj b/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj index cbaa647ca3e5ad..e4e71fc81cdc47 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj +++ b/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj @@ -2,7 +2,9 @@ - + + browser-wasm + diff --git a/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj b/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj index 64b290af04e8bc..b0a9b86f5ae2f4 100644 --- a/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj +++ b/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj @@ -2,7 +2,9 @@ - + + browser-wasm + From 0851bb6c7c01c915bea0127121299886fc3eace0 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Wed, 17 Feb 2021 16:20:35 -0800 Subject: [PATCH 02/13] Fix runtime subset for browser leg --- eng/pipelines/runtime-linker-tests.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index 946e569f9be9a0..af32d469163f7e 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -57,10 +57,25 @@ jobs: - windows_x64 - OSX_x64 - Linux_x64 - - Browser_wasm jobParameters: testGroup: innerloop timeoutInMinutes: 120 nameSuffix: Runtime_Release buildArgs: -s clr+libs -c $(_BuildConfig) extraStepsTemplate: /eng/pipelines/libraries/execute-trimming-tests-steps.yml + +# +# Build Release config vertical for Browser-wasm +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - Browser_wasm + jobParameters: + testGroup: innerloop + timeoutInMinutes: 120 + nameSuffix: Runtime_Release + buildArgs: -s mono+libs -c $(_BuildConfig) + extraStepsTemplate: /eng/pipelines/libraries/execute-trimming-tests-steps.yml From e2f7575c0d97271fe7c3392b4a05a662694c06ec Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Thu, 18 Feb 2021 13:52:56 -0800 Subject: [PATCH 03/13] Addressing PR feedback --- eng/testing/linker/SupportFiles/Directory.Build.targets | 2 +- eng/testing/linker/trimmingTests.targets | 2 +- ...icrosoft.Extensions.Logging.Console.TrimmingTests.proj | 5 ++--- .../System.Net.HttpListener.TrimmingTests.proj | 7 ++++--- ...em.Security.Cryptography.Algorithms.TrimmingTests.proj | 8 +++++--- .../System.Security.Cryptography.Csp.TrimmingTests.proj | 8 +++++--- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 5362f6426f8cb4..b46f7fc00b2cdf 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -32,7 +32,7 @@ diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 45a71288bef198..f9a52752b47dbe 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -37,7 +37,7 @@ - + %(Identity) diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj index c227b753f7037b..866b55f9a42db2 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj @@ -3,12 +3,11 @@ Microsoft.Extensions.Logging.Console + browser-wasm - - browser-wasm - + diff --git a/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj b/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj index 8bcfd0866b8d11..a5f024befdad92 100644 --- a/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj +++ b/src/libraries/System.Net.HttpListener/tests/TrimmingTests/System.Net.HttpListener.TrimmingTests.proj @@ -1,18 +1,19 @@ + + browser-wasm + + CookieExtensionsTest.Helper.cs - browser-wasm CookieExtensionsTest.Helper.cs - browser-wasm CookieExtensionsTest.Helper.cs - browser-wasm diff --git a/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj b/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj index e4e71fc81cdc47..78a0753df44404 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj +++ b/src/libraries/System.Security.Cryptography.Algorithms/tests/TrimmingTests/System.Security.Cryptography.Algorithms.TrimmingTests.proj @@ -1,10 +1,12 @@ + + browser-wasm + + - - browser-wasm - + diff --git a/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj b/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj index b0a9b86f5ae2f4..bf94bef8e39fe1 100644 --- a/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj +++ b/src/libraries/System.Security.Cryptography.Csp/tests/TrimmingTests/System.Security.Cryptography.Csp.TrimmingTests.proj @@ -1,10 +1,12 @@ + + browser-wasm + + - - browser-wasm - + From ac445fe69512f10e6b2542bba5b13d80501e6221 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Thu, 18 Feb 2021 14:07:07 -0800 Subject: [PATCH 04/13] Removing double RuntimePackProperty --- eng/testing/linker/SupportFiles/Directory.Build.targets | 2 +- eng/testing/linker/project.csproj.template | 1 - eng/testing/linker/trimmingTests.targets | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index b46f7fc00b2cdf..7fe8de49aecae9 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -14,7 +14,7 @@ - + diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index c53467440779de..e3811142feb049 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -11,7 +11,6 @@ {RepositoryEngineeringDir} {NetCoreAppCurrent} {RuntimeIdentifier} - {RuntimePackDir} {TargetingPackDir} {NetCoreAppMaximumVersion} {MicrosoftNETCoreAppVersion} diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index f9a52752b47dbe..e08900858c4a12 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -33,7 +33,6 @@ $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'AppBundle', 'run-v8.sh')) $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish')) $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'AppBundle')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.runtime.%(TestRuntimeIdentifier)', '$(Configuration)')) @@ -73,7 +72,6 @@ .Replace('{MicrosoftNETCoreAppVersion}', '$(MicrosoftNETCoreAppVersion)') .Replace('{NetCoreAppCurrent}', '$(NetCoreAppCurrent)') .Replace('{NetCoreAppMaximumVersion}', '$(NetCoreAppMaximumVersion)') - .Replace('{RuntimePackDir}', '%(TestConsoleApps.RuntimePackDirectory)') .Replace('{TargetingPackDir}','$(MicrosoftNetCoreAppRefPackDir)') .Replace('{RuntimeIdentifier}','%(TestConsoleApps.TestRuntimeIdentifier)') .Replace('{MicrosoftNETILLinkTasksVersion}', '$(MicrosoftNETILLinkTasksVersion)') From 7978a0714c847b0c2dbef44ce18a48f9c281f86f Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 19 Feb 2021 13:11:36 -0800 Subject: [PATCH 05/13] Addressing feedback and updating container image --- eng/pipelines/common/platform-matrix.yml | 2 +- eng/testing/linker/SupportFiles/Directory.Build.props | 1 + eng/testing/linker/SupportFiles/Directory.Build.targets | 2 ++ eng/testing/tests.mobile.targets | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 91e20974492f2f..4f6cad642ccad2 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -193,7 +193,7 @@ jobs: targetRid: browser-wasm platform: Browser_wasm container: - image: ubuntu-18.04-webassembly-20210217201218-6f4d99e + image: ubuntu-18.04-webassembly-20210219200611-3852446 registry: mcr jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props index 97a10a2c6a2c38..4121214dca4498 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.props +++ b/eng/testing/linker/SupportFiles/Directory.Build.props @@ -1,5 +1,6 @@ + true true true link diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 7fe8de49aecae9..b6bc8590a029df 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -31,6 +31,8 @@ + diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 90df033394b3b4..0e8fba47ea8993 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -10,7 +10,7 @@ true - + $HARNESS_RUNNER wasm $XHARNESS_COMMAND --app=. --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js --output-directory=$XHARNESS_OUT -- $(RunTestsJSArguments) --run WasmTestRunner.dll $(AssemblyName).dll $HARNESS_RUNNER wasm $XHARNESS_COMMAND --app=. --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js --output-directory=$XHARNESS_OUT --expected-exit-code=$(ExpectedExitCode) -- $(RunTestsJSArguments) --run $(AssemblyName).dll --testing From 37d33375de302ac7d6df5e1c75f99d0ed7c5eb9f Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 19 Feb 2021 14:35:07 -0800 Subject: [PATCH 06/13] Addressing some PR feedback and fixing runtimepack path --- .../linker/SupportFiles/Directory.Build.targets | 17 +++++++++++------ eng/testing/linker/trimmingTests.targets | 6 +----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index b6bc8590a029df..f718de6f7707ca 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -1,6 +1,11 @@ + + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle')) + project.dll + + @@ -14,7 +19,7 @@ - + @@ -41,13 +46,13 @@ + + - - $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle')) - project.dll - - diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index e08900858c4a12..998424e5fb34df 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -96,16 +96,12 @@ - - <_TrimmedProjectsPublishTargets>Publish - <_TrimmedProjectsPublishTargets Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'">$(_TrimmedProjectsPublishTargets);BundleTestWasmApp - From d9fb75f056cc4915e9cce56267adc05f7267463f Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Tue, 23 Feb 2021 10:51:23 -0800 Subject: [PATCH 07/13] Disabling a test and updating the wasm container used for the build --- eng/pipelines/common/platform-matrix.yml | 2 +- .../tests/TrimmingTests/System.Runtime.TrimmingTests.proj | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 4f6cad642ccad2..cbf5370a09300b 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -193,7 +193,7 @@ jobs: targetRid: browser-wasm platform: Browser_wasm container: - image: ubuntu-18.04-webassembly-20210219200611-3852446 + image: ubuntu-18.04-webassembly-20210223133559-4800846 registry: mcr jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} diff --git a/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj b/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj index a47113c347f5a2..e9d1ce5938714e 100644 --- a/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj +++ b/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj @@ -18,6 +18,10 @@ as a workaround while the linker bug is fixed. This bug has been logged in the linker repo here: https://github.com/mono/linker/issues/1285 --> /p:DebugType=Embedded + + browser-wasm + + + + + + + + From 0172bf7926d178d367962384a297de2dee19e8a2 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Tue, 23 Feb 2021 15:12:59 -0800 Subject: [PATCH 09/13] Fix last remaining failing trimming test in browser-wasm --- .../tests/TrimmingTests/DispatchProxyTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Reflection.DispatchProxy/tests/TrimmingTests/DispatchProxyTest.cs b/src/libraries/System.Reflection.DispatchProxy/tests/TrimmingTests/DispatchProxyTest.cs index b2bc9bbff9c8a8..55177e1c5ae5ec 100644 --- a/src/libraries/System.Reflection.DispatchProxy/tests/TrimmingTests/DispatchProxyTest.cs +++ b/src/libraries/System.Reflection.DispatchProxy/tests/TrimmingTests/DispatchProxyTest.cs @@ -26,7 +26,7 @@ static int Main() } } -interface IFoo +public interface IFoo { public int Property1 { get; set; } public int UnusedProperty { get; set; } @@ -46,7 +46,7 @@ public void Method2() { } public void UnusedMethod3() { } } -class CountingProxy : DispatchProxy +public class CountingProxy : DispatchProxy { private IFoo _inner; public int InvocationCount { get; private set; } From 75406d5b228c1f8c39b1d07a8a1ce22ae3906cdf Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Wed, 24 Feb 2021 13:10:58 -0800 Subject: [PATCH 10/13] Removing workaround since the fix is in PR now --- .../linker/SupportFiles/Directory.Build.targets | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index f718de6f7707ca..722d8be7acdb1d 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -36,22 +36,12 @@ - - - - - - - - + From fb073e510f9f1759c9cdc2cdf6cc14a79b5bfcb0 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 26 Feb 2021 11:44:23 -0800 Subject: [PATCH 11/13] Addressing PR feedback and rebasing to master --- eng/testing/linker/SupportFiles/Directory.Build.props | 2 +- eng/testing/linker/SupportFiles/Directory.Build.targets | 1 - eng/testing/linker/project.csproj.template | 2 +- eng/testing/linker/trimmingTests.targets | 1 - eng/testing/tests.mobile.targets | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props index 4121214dca4498..e9dbfbf161555b 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.props +++ b/eng/testing/linker/SupportFiles/Directory.Build.props @@ -1,6 +1,6 @@ - true + false true true link diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 722d8be7acdb1d..f6557707fe93a2 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -42,7 +42,6 @@ Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'" /> - diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index e3811142feb049..1aa4bd79c59f06 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -4,9 +4,9 @@ Exe {MonoAOTCompilerDir} {MonoProjectRoot} + true {MonoAOTCompilerTasksAssemblyPath} {WasmAppBuilderTasksAssemblyPath} - {ILLinkTasksAssembly} {MicrosoftNetCoreAppRuntimePackRidDir} {RepositoryEngineeringDir} {NetCoreAppCurrent} diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 2e1c57d10a2c67..0473cfcd03636c 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -82,7 +82,6 @@ .Replace('{MonoProjectRoot}', '$(MonoProjectRoot)') .Replace('{MonoAOTCompilerTasksAssemblyPath}', '$(MonoAOTCompilerTasksAssemblyPath)') .Replace('{WasmAppBuilderTasksAssemblyPath}', '$(WasmAppBuilderTasksAssemblyPath)') - .Replace('{ILLinkTasksAssembly}', '$(ILLinkTasksAssembly)') .Replace('{MicrosoftNetCoreAppRuntimePackRidDir}', '$(MicrosoftNetCoreAppRuntimePackRidDir)'))" Overwrite="true" /> true - + $HARNESS_RUNNER wasm $XHARNESS_COMMAND --app=. --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js --output-directory=$XHARNESS_OUT -- $(RunTestsJSArguments) --run WasmTestRunner.dll $(AssemblyName).dll $HARNESS_RUNNER wasm $XHARNESS_COMMAND --app=. --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js --output-directory=$XHARNESS_OUT --expected-exit-code=$(ExpectedExitCode) -- $(RunTestsJSArguments) --run $(AssemblyName).dll --testing From dcc84d3fbcd27bc38f6e0b00614a2d3090f179fe Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 26 Feb 2021 13:54:55 -0800 Subject: [PATCH 12/13] Adding comment on tests.mobile.targets --- eng/testing/linker/SupportFiles/Directory.Build.props | 1 + eng/testing/tests.mobile.targets | 4 +++- .../tests/TrimmingTests/System.Runtime.TrimmingTests.proj | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props index e9dbfbf161555b..adaad9bfd9db65 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.props +++ b/eng/testing/linker/SupportFiles/Directory.Build.props @@ -1,5 +1,6 @@ + true false true true diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 48861ee41036f9..4fe3cadd832919 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -162,7 +162,9 @@ - + + link diff --git a/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj b/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj index e9d1ce5938714e..fd556a37d675ac 100644 --- a/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj +++ b/src/libraries/System.Runtime/tests/TrimmingTests/System.Runtime.TrimmingTests.proj @@ -20,7 +20,8 @@ /p:DebugType=Embedded + and tested with this test. Issue https://github.com/dotnet/runtime/issues/48849 is + tracking investigation on why this test is failing if not skipped. --> browser-wasm From 8629f9e39e56b45537920144417e188bbf7d2a3a Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 26 Feb 2021 16:07:46 -0800 Subject: [PATCH 13/13] Removing unused trimming setting --- eng/testing/linker/project.csproj.template | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index 1aa4bd79c59f06..7ac21cbcb5b5f0 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -4,7 +4,6 @@ Exe {MonoAOTCompilerDir} {MonoProjectRoot} - true {MonoAOTCompilerTasksAssemblyPath} {WasmAppBuilderTasksAssemblyPath} {MicrosoftNetCoreAppRuntimePackRidDir}