From cc76effddafbd81c3684b9daa5f29e86c0329f43 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 12 Jul 2023 13:04:33 -0400 Subject: [PATCH] [wasm] WBT: Fix breaking tests `Wasm.Build.Tests.WasmTemplateTests.RunWithDifferentAppBundleLocations` broke with the latest sdk: `/root/helix/work/workitem/e/dotnet-latest/sdk/8.0.100-preview.7.23362.1/Roslyn/Microsoft.CSharp.Core.targets(80,5): error MSB6004: The specified task executable location "/root/helix/work/workitem/e/dotnet-latest/dotnet/dotnet" is invalid.` This was because https://github.com/dotnet/roslyn/pull/68918 changed to expect `DOTNET_ROOT` to be a directory instead of the exe path. --- src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs b/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs index b13b6011de265..5ab27489622ae 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs @@ -11,7 +11,7 @@ public class RunCommand : DotNetCommand public RunCommand(BuildEnvironment buildEnv, ITestOutputHelper _testOutput, string label="") : base(buildEnv, _testOutput, false, label) { WithEnvironmentVariables(buildEnv.EnvVars); - WithEnvironmentVariable("DOTNET_ROOT", buildEnv.DotNet); + WithEnvironmentVariable("DOTNET_ROOT", Path.GetDirectoryName(buildEnv.DotNet)!); WithEnvironmentVariable("DOTNET_INSTALL_DIR", Path.GetDirectoryName(buildEnv.DotNet)!); WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0"); WithEnvironmentVariable("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "1");