Skip to content

[browser] msbuild leaks tesing #114258

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ while [[ -h "$source" ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

export MSBUILD_TELEMETRY_SAMPLE_RATE=1.0
export MSBUILDFLUSHNODESTELEMETRYINTOCONSOLE=1
export MSBUILDOUTPUTNODESTELEMETRY=1
export DOTNET_CLI_TELEMETRY_OPTOUT=0

usage()
{
echo "Common settings:"
Expand Down
1 change: 0 additions & 1 deletion eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {

# Disable telemetry on CI.
if ($ci) {
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
}

# Find the first path on %PATH% that contains the dotnet.exe
Expand Down
5 changes: 0 additions & 5 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ function InitializeDotNetCli {
# Disable first run since we want to control all package sources
export DOTNET_NOLOGO=1

# Disable telemetry on CI
if [[ $ci == true ]]; then
export DOTNET_CLI_TELEMETRY_OPTOUT=1
fi

# LTTNG is the logging infrastructure used by Core CLR. Need this variable set
# so it doesn't output warnings to the console.
export LTTNG_HOME="$HOME"
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/common/templates/pipeline-with-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ extends:

browser_wasm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-webassembly-amd64
options: "--name sample -v /usr/bin/docker:/tmp/docker:ro"
env:
ROOTFS_DIR: /crossrootfs/x64

Expand Down
8 changes: 0 additions & 8 deletions eng/pipelines/common/templates/wasm-library-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,3 @@ jobs:
or(
eq(variables['alwaysRunVar'], true),
eq(variables['isDefaultPipeline'], variables['shouldRunOnDefaultPipelines']))
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraHelixArguments: /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArguments }}
scenarios: ${{ parameters.scenarios }}
1,712 changes: 2 additions & 1,710 deletions eng/pipelines/runtime.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
<XUnitUseRandomizedTestOrderer>false</XUnitUseRandomizedTestOrderer>
<MetadataUpdaterSupport>true</MetadataUpdaterSupport>
</PropertyGroup>
<ItemGroup>

<!-- ActiveIssue https://github.com/dotnet/runtime/issues/114526 deadlocks on linux CI -->
<ItemGroup Condition="'$(ContinuousIntegrationBuild)' != 'true' or '$(TargetOS)' != 'browser' or '$(OS)' == 'Windows_NT'">
<Compile Include="ApplyUpdateTest.cs" />
<Compile Include="ApplyUpdateUtil.cs" />
<Compile Include="MetadataUpdateHandlerAttributeTest.cs" />
</ItemGroup>

<ItemGroup>
<Compile Include="AssemblyExtensionsTest.cs" />
<Compile Include="AssemblyLoadContextTest.cs" />
<Compile Include="CollectibleAssemblyLoadContextTest.cs" />
<Compile Include="ContextualReflection.cs" />
<Compile Include="CustomTPALoadContext.cs" />
<Compile Include="MetadataUpdateHandlerAttributeTest.cs" />
<Compile Include="ResourceAssemblyLoadContext.cs" />
<Compile Include="SatelliteAssemblies.cs" />
<Compile Include="LoaderLinkTest.cs" />
Expand All @@ -45,7 +50,10 @@
<ProjectReference Include="ReferencedClassLibNeutralIsSatellite\ReferencedClassLibNeutralIsSatellite.csproj" />
<ProjectReference Include="LoaderLinkTest.Shared\LoaderLinkTest.Shared.csproj" />
<ProjectReference Include="LoaderLinkTest.Dynamic\LoaderLinkTest.Dynamic.csproj" />
</ItemGroup>

<!-- ActiveIssue https://github.com/dotnet/runtime/issues/114526 deadlocks on linux CI -->
<ItemGroup Condition="'$(ContinuousIntegrationBuild)' != 'true' or '$(TargetOS)' != 'browser' or '$(OS)' == 'Windows_NT'">
<!-- ApplyUpdate tests -->
<ProjectReference Include="ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.AsyncMethodChange\System.Reflection.Metadata.ApplyUpdate.Test.AsyncMethodChange.csproj" />
<ProjectReference Include="ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.CustomAttributeDelete\System.Reflection.Metadata.ApplyUpdate.Test.CustomAttributeDelete.csproj" />
Expand Down
9 changes: 6 additions & 3 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,19 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Tensors\tests\Net8Tests\System.Numerics.Tensors.Net8.Tests.csproj" />
</ItemGroup>

<!-- ActiveIssue https://github.com/dotnet/runtime/issues/114526 deadlocks on linux CI -->
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(OS)' != 'Windows_NT' and '$(ContinuousIntegrationBuild)' == 'true'">
<ProjectExclusions Include="$(MonoProjectRoot)sample/wasm/**/*.csproj" />
<ProjectExclusions Include="$(RepoRoot)src/tests/FunctionalTests/WebAssembly/Browser/HotReload/WebAssembly.Browser.HotReload.Test.csproj" />
</ItemGroup>

<!-- Samples that require a multi-threaded runtime -->
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(WasmEnableThreads)' != 'true'" >
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-threads\Wasm.Browser.Threads.Sample.csproj" />
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-eventpipe\Wasm.Browser.EventPipe.Sample.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(WasmEnableThreads)' == 'true'" >
<!-- https://github.com/dotnet/runtime/issues/91676 -->
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-minimal-config\Wasm.Browser.Config.Sample.csproj" />
<!-- https://github.com/dotnet/runtime/issues/98026 -->
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-eventpipe\Wasm.Browser.EventPipe.Sample.csproj" />
</ItemGroup>

<!-- wasm EAT/AOT -->
Expand Down
6 changes: 6 additions & 0 deletions src/mono/browser/build/WasmApp.InTree.CI.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<!-- redefine SDK tasks below with TaskHostFactory to avoid memory issues https://github.com/dotnet/msbuild/issues/11337 -->
<UsingTask TaskName="GenerateDepsFile" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" TaskFactory="TaskHostFactory" />
<UsingTask TaskName="Microsoft.DotNet.ApiCompat.Task.ValidateAssembliesTask" AssemblyFile="$(DotNetApiCompatTaskAssembly)" TaskFactory="TaskHostFactory" />
<UsingTask TaskName="ResolveRuntimePackAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" TaskFactory="TaskHostFactory" />
</Project>
1 change: 1 addition & 0 deletions src/mono/browser/build/WasmApp.InTree.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(TargetingpacksTargetsImported)' != 'true' and '$(ImportTargetingPacksTargetsInWasmAppTargets)' == 'true'"/>
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.targets" Condition="'$(UsingNativeAOT)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)EmSdkRepo.Defaults.props" Condition="'$(UsingNativeAOT)' == 'true' and '$(EMSDK_PATH)' != ''" />
<Import Project="$(MSBuildThisFileDirectory)WasmApp.InTree.CI.targets" Condition="'$(ContinuousIntegrationBuild)' == 'true'" />

<!-- FIXME: use proper dependency -->
<Target Name="SetupAppHostConfig" BeforeTargets="_WasmGenerateAppBundle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<Compile Include="MethodBody1.cs" />
</ItemGroup>

<ItemGroup>
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/114526 deadlocks on linux CI -->
<ItemGroup Condition="'$(OS)' != 'Windows_NT' or '$(ContinuousIntegrationBuild)' != 'true'">
<!-- This package from https://github.com/dotnet/hotreload-utils provides
targets that read the json delta script and generates deltas based on the baseline assembly and the modified sources.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
<!-- setting WasmXHarnessMonoArgs doesn't work here, but see main.js -->
<!-- <WasmXHarnessMonoArgs>- -setenv=DOTNET_MODIFIABLE_ASSEMBLIES=debug</WasmXHarnessMonoArgs> -->
<MetadataUpdaterSupport>true</MetadataUpdaterSupport>

<!-- ActiveIssue https://github.com/dotnet/runtime/issues/114526 deadlocks on linux CI -->
<IgnoreForCI Condition="'$(OS)' != 'Windows_NT' and '$(ContinuousIntegrationBuild)' == 'true'">true</IgnoreForCI>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT' or '$(ContinuousIntegrationBuild)' != 'true'">
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/114526 deadlocks on linux CI -->
<ProjectReference Include="ApplyUpdateReferencedAssembly\ApplyUpdateReferencedAssembly.csproj" />
</ItemGroup>

Expand Down