Fix publish test for 32-bit environments.

Ensure the correct DOTNET_ROOT variable is set for the apphost being run.
This commit is contained in:
Peter Huene 2018-06-11 21:55:47 -07:00
parent da2b1b90ec
commit 8205dd4a15
No known key found for this signature in database
GPG key ID: E1D265D820213D6A

View file

@ -135,7 +135,8 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
var command = new TestCommand(outputProgram);
command.Environment["DOTNET_ROOT"]= new RepoDirectoriesProvider().DotnetRoot;
command.Environment[Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"] =
new RepoDirectoriesProvider().DotnetRoot;
command.ExecuteWithCapturedOutput()
.Should()