Skip to content

Commit

Permalink
Merge pull request #1525 from vitek-karas/OpenInstallerTestSln
Browse files Browse the repository at this point in the history
Setup environment to open the installer test sln
  • Loading branch information
vitek-karas authored Jan 17, 2020
2 parents bcfbdd5 + 6b785e3 commit c2e4efc
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,26 @@ $subsetCategory = $subsetCategory.ToLowerInvariant()
if ($vs) {
. $PSScriptRoot\common\tools.ps1

if (-Not (Test-Path $vs)) {
$vs = Join-Path "$PSScriptRoot\..\src\libraries" $vs | Join-Path -ChildPath "$vs.sln"
# Microsoft.DotNet.CoreSetup.sln is special - hosting tests are currently meant to run on the
# bootstrapped .NET Core, not on the live-built runtime.
if ([System.IO.Path]::GetFileName($vs) -ieq "Microsoft.DotNet.CoreSetup.sln") {
if (-Not (Test-Path $vs)) {
$vs = Join-Path "$PSScriptRoot\..\src\installer" $vs
}

# This tells .NET Core to use the bootstrapped runtime to run the tests
$env:DOTNET_ROOT=InitializeDotNetCli -install:$false
}
else {
if (-Not (Test-Path $vs)) {
$vs = Join-Path "$PSScriptRoot\..\src\libraries" $vs | Join-Path -ChildPath "$vs.sln"
}

$archTestHost = if ($arch) { $arch } else { "x64" }
$archTestHost = if ($arch) { $arch } else { "x64" }

# This tells .NET Core to use the same dotnet.exe that build scripts use
$env:DOTNET_ROOT="$PSScriptRoot\..\artifacts\bin\testhost\netcoreapp5.0-Windows_NT-$configuration-$archTestHost";
# This tells .NET Core to use the same dotnet.exe that build scripts use
$env:DOTNET_ROOT="$PSScriptRoot\..\artifacts\bin\testhost\netcoreapp5.0-Windows_NT-$configuration-$archTestHost";
}

# This tells MSBuild to load the SDK from the directory of the bootstrapped SDK
$env:DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=InitializeDotNetCli -install:$false
Expand Down

0 comments on commit c2e4efc

Please sign in to comment.