Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Redirect default install location in test to avoid using machine-wide…
Browse files Browse the repository at this point in the history
… install (#9230)

* Redirect default install location in test to avoid using machine-wide install

* Updated windows build image to Windows.10.vs2019.amd64

Co-authored-by: Sean Reeser <v-seanreeser@microsoft.com>
  • Loading branch information
elinor-fung and vseanreesermsft committed Nov 16, 2022
1 parent 2e6e595 commit 2e0ae6d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ stages:
dependsOn: PrepareSignedArtifacts
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals build.windows.10.amd64.vs2017
demands: ImageOverride -equals Windows.10.vs2019.amd64

- template: /eng/stages/publish.yml
2 changes: 1 addition & 1 deletion eng/jobs/prepare-signed-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
dependsOn: ${{ parameters.dependsOn }}
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals build.windows.10.amd64.vs2017
demands: ImageOverride -equals Windows.10.vs2019.amd64
# Double the default timeout.
timeoutInMinutes: 120
workspace:
Expand Down
4 changes: 2 additions & 2 deletions eng/jobs/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
# Use a hosted pool when possible.
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCore-Svc-Public
demands: ImageOverride -equals build.windows.10.amd64.vs2017.open
demands: ImageOverride -equals Windows.10.vs2019.amd64.open
${{ if ne(variables['System.TeamProject'], 'public') }}:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals build.windows.10.amd64.vs2017
demands: ImageOverride -equals Windows.10.vs2019.amd64
strategy:
matrix:
debug:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ private CommandResult RunTest(Func<RuntimeConfig, RuntimeConfig> runtimeConfig)
SharedState.FrameworkReferenceApp,
new TestSettings()
.WithRuntimeConfigCustomizer(runtimeConfig)
.WithEnvironment(Constants.TestOnlyEnvironmentVariables.GloballyRegisteredPath, SharedState.DotNetGlobalHive.BinPath),
.WithEnvironment(Constants.TestOnlyEnvironmentVariables.GloballyRegisteredPath, SharedState.DotNetGlobalHive.BinPath)
.WithEnvironment( // Redirect the default install location to an invalid location so that a machine-wide install is not used
Constants.TestOnlyEnvironmentVariables.DefaultInstallPath,
System.IO.Path.Combine(SharedState.DotNetMainHive.BinPath, "invalid")),
// Must enable multi-level lookup otherwise multiple hives are not enabled
multiLevelLookup: true);
}
Expand Down

0 comments on commit 2e0ae6d

Please sign in to comment.