Skip to content
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

[release/7.0] [wasm] Add workaround for msbuild issue in tests #76090

Merged
merged 4 commits into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/pipelines/coreclr/templates/run-performance-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
sudo apt-get update &&
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates &&
$(HelixPreCommandsWasmOnLinux) &&
export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 &&
export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
|| export PERF_PREREQS_INSTALL_FAILED=1;
test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
Expand Down
3 changes: 2 additions & 1 deletion eng/testing/performance/microbenchmarks.proj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<Python>python3</Python>
<CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
<BaselineCoreRun>$(BaseDirectory)/Baseline_Core_Root/corerun</BaselineCoreRun>
<HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
<!-- Set DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 as a workaround for https://github.com/dotnet/runtime/issues/74328 -->
<HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh;export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1</HelixPreCommands>
<ArtifactsDirectory>$HELIX_WORKITEM_ROOT/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
<BaselineArtifactsDirectory>$HELIX_WORKITEM_ROOT/artifacts/BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
<ResultsComparer>$(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj</ResultsComparer>
Expand Down
4 changes: 4 additions & 0 deletions eng/testing/tests.wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@
<SetScriptCommands Condition="'$(JSEngine)' != ''" Include="export JS_ENGINE=--engine=$(JSEngine)" />
<SetScriptCommands Condition="'$(JSEngineArgs)' != ''" Include="export JS_ENGINE_ARGS=$(JSEngineArgs)" />
<SetScriptCommands Condition="'$(_WasmMainJSFileName)' != ''" Include="export MAIN_JS=--js-file=$(_WasmMainJSFileName)" />
<!-- Workaround for https://github.com/dotnet/runtime/issues/74328 -->
<SetScriptCommands Condition="'$(BuildAOTTestsOnHelix)' == 'true'" Include="export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1" />
</ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<SetScriptCommands Condition="'$(Scenario)' != '' and '$(ContinuousIntegrationBuild)' != 'true'" Include="set &quot;SCENARIO=$(Scenario)&quot;" />
<SetScriptCommands Condition="'$(JSEngine)' != ''" Include="set &quot;JS_ENGINE=--engine^=$(JSEngine)&quot;" />
<SetScriptCommands Condition="'$(JSEngineArgs)' != ''" Include="set &quot;JS_ENGINE_ARGS=$(JSEngineArgs)&quot;" />
<SetScriptCommands Condition="'$(_WasmMainJSFileName)' != ''" Include="set &quot;MAIN_JS=--js-file^=$(_WasmMainJSFileName)&quot;" />
<!-- Workaround for https://github.com/dotnet/runtime/issues/74328 -->
<SetScriptCommands Condition="'$(BuildAOTTestsOnHelix)' == 'true'" Include="set DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1" />
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/tests/BuildWasmApps/Wasm.Build.Tests/DotNetCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public DotNetCommand(BuildEnvironment buildEnv, ITestOutputHelper _testOutput, b
_useDefaultArgs = useDefaultArgs;
if (useDefaultArgs)
WithEnvironmentVariables(buildEnv.EnvVars);
// workaround msbuild issue - https://github.com/dotnet/runtime/issues/74328
WithEnvironmentVariable("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "1");
}

protected override string GetFullArgs(params string[] args)
Expand Down
2 changes: 2 additions & 0 deletions src/tests/BuildWasmApps/Wasm.Build.Tests/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ public RunCommand(BuildEnvironment buildEnv, ITestOutputHelper _testOutput, stri
WithEnvironmentVariable("DOTNET_INSTALL_DIR", Path.GetDirectoryName(buildEnv.DotNet)!);
WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0");
WithEnvironmentVariable("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "1");
// workaround msbuild issue - https://github.com/dotnet/runtime/issues/74328
WithEnvironmentVariable("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "1");
}
}
3 changes: 3 additions & 0 deletions src/tests/Common/CLRTest.Execute.Bash.targets
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ else
__Command+=" dotnet"
fi

# workaround msbuild issue - https://github.com/dotnet/runtime/issues/74328
export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1

$__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreAppCurrent=$(NetCoreAppCurrent) /p:TestAssemblyFileName=$(MsBuildProjectName).dll /p:TestBinDir=`pwd` $(CLRTestMSBuildArgs) || exit $?

]]>
Expand Down