Check bitness of dotnet under test instead of test host process

This commit is contained in:
Daniel Plaisted 2018-11-29 21:07:50 -08:00
parent c4452f06c7
commit 7d461295be
2 changed files with 14 additions and 1 deletions

View file

@ -41,7 +41,8 @@ namespace EndToEnd.Tests
var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
if (!string.IsNullOrEmpty(dotnetRoot))
{
runCommand = runCommand.WithEnvironmentVariable(Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)",
bool useX86 = RepoDirectoriesProvider.DotnetRidUnderTest.EndsWith("x86", StringComparison.InvariantCultureIgnoreCase);
runCommand = runCommand.WithEnvironmentVariable(useX86 ? "DOTNET_ROOT(x86)" : "DOTNET_ROOT",
dotnetRoot);
}