Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Jain <radical@gmail.com>2022-08-14 04:30:30 +0300
committerGitHub <noreply@github.com>2022-08-14 04:30:30 +0300
commit7d986fa00cfc93e656e5bc548f244df82c401b59 (patch)
tree5e1f08b10e9c72bc4f64bf0b92c9d9a7342d3037 /eng/testing
parent88ba045408ebd103a66e0ba7536531ed89a97467 (diff)
[wasm] Misc tests related fixes (#73884)
* [wasm] Stop running crypto tests with subtlecrypto * [wasm] Add --web-server-use-cop for samples when running on helix for a threaded build * [wasm] Makefile, honor V=1 and emit binlog * [wasm] PInvokeTableGenerator: emit the type name also, for the warning * [wasm] Improve build for non-default runtime packs .. by using `MSBuild` task to build them instead of invoking `dotnet.sh`. - And fix incremental builds * [wasm] Run smoke tests only for AOT - Building, and running all the tests for EAT case will help catch linker errors that can slip through. * [wasm] Fix linker errors for tests Fixes https://github.com/dotnet/runtime/issues/73901
Diffstat (limited to 'eng/testing')
-rw-r--r--eng/testing/helix-extension-example.targets35
-rw-r--r--eng/testing/tests.wasm.targets13
-rw-r--r--eng/testing/workloads-testing.targets24
3 files changed, 57 insertions, 15 deletions
diff --git a/eng/testing/helix-extension-example.targets b/eng/testing/helix-extension-example.targets
new file mode 100644
index 00000000000..e14095c0756
--- /dev/null
+++ b/eng/testing/helix-extension-example.targets
@@ -0,0 +1,35 @@
+<Project>
+ <PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and '$(Scenario)' == 'WasmTestOnBrowser'">
+ <HelixExtensionTargets>$(HelixExtensionTargets);_AddHelixCrypoItems</HelixExtensionTargets>
+ <_CryptoProjectName>System.Security.Cryptography.Tests</_CryptoProjectName>
+ </PropertyGroup>
+
+ <Target Name="_AddHelixCrypoItems">
+ <ItemGroup>
+ <!-- remove the existing item -->
+ <HelixWorkItem Remove="@(HelixWorkItem)" Condition="'%(HelixWorkItem.Identity)' == '$(Scenario)-$(_CryptoProjectName)'" />
+
+ <!-- add two new ones - managed, and subtylecrypto -->
+ <HelixWorkItem Include="$(WorkItemPrefix)managed-$(_CryptoProjectName)">
+ <PayloadArchive>$(TestArchiveTestsDir)$(_CryptoProjectName).zip</PayloadArchive>
+ <Command>$(HelixCommand)</Command>
+ <Timeout>$(_workItemTimeout)</Timeout>
+ </HelixWorkItem>
+
+ <HelixWorkItem Include="$(WorkItemPrefix)subtlecrypto-$(_CryptoProjectName)">
+ <PayloadArchive>$(TestArchiveTestsDir)$(_CryptoProjectName).zip</PayloadArchive>
+ <Command>$(HelixCommand)</Command>
+ <Timeout>$(_workItemTimeout)</Timeout>
+
+ <PreCommands Condition="'$(OS)' == 'Windows_NT'">set &quot;WasmXHarnessArgs=%WasmXHarnessArgs% --web-server-use-cop&quot; &amp; set &quot;WasmXHarnessMonoArgs=--setenv=TEST_EXPECT_SUBTLE_CRYPTO=true&quot;</PreCommands>
+ <PreCommands Condition="'$(OS)' != 'Windows_NT'">export &quot;WasmXHarnessArgs=$WasmXHarnessArgs --web-server-use-cop&quot; &amp;&amp; export &quot;WasmXHarnessMonoArgs=--setenv=TEST_EXPECT_SUBTLE_CRYPTO=true&quot;</PreCommands>
+ </HelixWorkItem>
+
+ <_CryptoHelixItem Include="@(HelixWorkItem)"
+ Condition="$([System.String]::new('%(HelixWorkItem.Identity)').EndsWith('-$(_CryptoProjectName)'))" />
+ </ItemGroup>
+
+ <Error Text="Something went wrong. Expected to have only two work items for $(_CryptoProjectName). But got @(_CryptoHelixItem)"
+ Condition="@(_CryptoHelixItem->Count()) != 2" />
+ </Target>
+</Project>
diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets
index 398c0b158de..02af8e04189 100644
--- a/eng/testing/tests.wasm.targets
+++ b/eng/testing/tests.wasm.targets
@@ -5,10 +5,6 @@
<WasmGenerateAppBundle Condition="'$(WasmGenerateAppBundle)' == ''">true</WasmGenerateAppBundle>
<BundleTestAppTargets>$(BundleTestAppTargets);BundleTestWasmApp</BundleTestAppTargets>
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' == 'Debug'">true</DebuggerSupport>
- <!-- suppress warnings as these are tests, and not expected to be trim-safe -->
- <SuppressTrimAnalysisWarnings Condition="'$(EnableAggressiveTrimming)' == 'true'">true</SuppressTrimAnalysisWarnings>
- <!-- This warning code isn't yet included in SuppressTrimAnalysisWarnings -->
- <NoWarn Condition="'$(EnableAggressiveTrimming)' == 'true'">$(NoWarn);IL2118</NoWarn>
<!-- set this when provisioning emsdk on CI -->
<EMSDK_PATH Condition="'$(EMSDK_PATH)' == '' and '$(ContinuousIntegrationBuild)' == 'true' and '$(MonoProjectRoot)' != ''">$([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasm', 'emsdk'))</EMSDK_PATH>
@@ -33,6 +29,15 @@
<_UseWasmSymbolicator Condition="'$(TestTrimming)' != 'true'">true</_UseWasmSymbolicator>
</PropertyGroup>
+ <PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true'">
+ <!-- suppress warnings as these are tests, and not expected to be trim-safe -->
+ <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
+ <!-- This warning code isn't yet included in SuppressTrimAnalysisWarnings -->
+ <NoWarn>$(NoWarn);IL2118</NoWarn>
+ <!-- IL2121: Unnecessary UnconditionalSuppressMessage attribute -->
+ <NoWarn>$(NoWarn);IL2121</NoWarn>
+ </PropertyGroup>
+
<PropertyGroup>
<BuildAOTTestsOn Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(Scenario)' == 'BuildWasmApps'">helix</BuildAOTTestsOn>
<BuildAOTTestsOn Condition="'$(BuildAOTTestsOnHelix)' == 'true'">helix</BuildAOTTestsOn>
diff --git a/eng/testing/workloads-testing.targets b/eng/testing/workloads-testing.targets
index 9fc7e7a1391..5da047758f8 100644
--- a/eng/testing/workloads-testing.targets
+++ b/eng/testing/workloads-testing.targets
@@ -116,14 +116,9 @@
</PropertyGroup>
<ItemGroup>
- <_DefaultPropsForNuGetBuild Include="Configuration=$(Configuration)" />
- <_DefaultPropsForNuGetBuild Include="TargetOS=Browser" />
- <_DefaultPropsForNuGetBuild Include="TargetArchitecture=wasm" />
- <_DefaultPropsForNuGetBuild Include="ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)" />
-
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Ref.$(_PackageVersion).nupkg"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj"
- BuildArgs="@(_DefaultPropsForNuGetBuild -> '-p:%(Identity)', ' ')"
+ Properties="@(_DefaultPropsForNuGetBuild, ';')"
Descriptor="Ref pack"/>
<!-- AOT Cross compiler -->
@@ -131,10 +126,11 @@
<_PropsForAOTCrossBuild Include="TestingWorkloads=true" />
<_PropsForAOTCrossBuild Include="RuntimeIdentifier=$(NETCoreSdkRuntimeIdentifier)" />
<_PropsForAOTCrossBuild Include="TargetCrossRid=$(RuntimeIdentifier)" />
+ <_PropsForAOTCrossBuild Include="DisableSourceLink=true" />
<_NuGetsToBuild Include="$(_AOTCrossNuGetPath)"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.MonoCrossAOT.sfxproj"
- BuildArgs="@(_PropsForAOTCrossBuild -> '-p:%(Identity)', ' ')"
+ Properties="@(_PropsForAOTCrossBuild,';')"
Descriptor="AOT Cross compiler"/>
</ItemGroup>
</Target>
@@ -143,7 +139,13 @@
<Message Importance="High" Text="
** Building %(_NuGetsToBuild.Descriptor) **
" />
- <Exec Command="dotnet build -bl -restore -v:q --nologo -t:Pack %(_NuGetsToBuild.BuildArgs) %(_NuGetsToBuild.Project)" />
+
+ <MSBuild Projects="%(_NuGetsToBuild.Project)"
+ Properties="%(_NuGetsToBuild.Properties)"
+ Targets="Restore" />
+ <MSBuild Projects="%(_NuGetsToBuild.Project)"
+ Properties="%(_NuGetsToBuild.Properties)"
+ Targets="Pack" />
</Target>
<!-- For local builds, only one of the 3 required runtime packs might be available. In that case,
@@ -158,7 +160,7 @@
<_DefaultBuildVariant Condition="'$(WasmEnablePerfTracing)' == 'true' or '$(MonoWasmBuildVariant)' == 'perftrace'">.perftrace.</_DefaultBuildVariant>
<_DefaultBuildVariant Condition="'$(_DefaultBuildVariant)' == ''">.</_DefaultBuildVariant>
- <_DefaultRuntimePackNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono$(_DefaultBuildVariant)browser-wasm$(_PackageVersion).nupkg</_DefaultRuntimePackNuGetPath>
+ <_DefaultRuntimePackNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono$(_DefaultBuildVariant)browser-wasm.$(_PackageVersion).nupkg</_DefaultRuntimePackNuGetPath>
</PropertyGroup>
<ItemGroup>
@@ -175,13 +177,13 @@
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.%(_BuildVariants.Identity).browser-wasm.$(_PackageVersion).nupkg"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"
Dependencies="$(_DefaultRuntimePackNuGetPath)"
- BuildArgs="@(_DefaultPropsForNuGetBuild -> '-p:%(Identity)', ' ') /p:MonoWasmBuildVariant=%(_BuildVariants.Identity)"
+ Properties="@(_DefaultPropsForNuGetBuild, ';');MonoWasmBuildVariant=%(_BuildVariants.Identity)"
Descriptor="runtime pack for %(_BuildVariants.Identity)" />
<!-- add for non-threaded runtime also -->
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.browser-wasm.$(_PackageVersion).nupkg"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"
- BuildArgs="@(_DefaultPropsForNuGetBuild -> '-p:%(Identity)', ' ')"
+ Properties="@(_DefaultPropsForNuGetBuild, ';')"
Dependencies="$(_DefaultRuntimePackNuGetPath)"
Descriptor="single threaded runtime pack"
Condition="'$(_DefaultBuildVariant)' != '.'" />