Handling configuration when the env variable is not set.
This commit is contained in:
parent
58bc3b5853
commit
8ad1982013
2 changed files with 6 additions and 6 deletions
|
@ -92,7 +92,8 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
var testAppName = "MSBuildTestAppWithToolInDependencies";
|
||||
var testInstance = TestAssetsManager
|
||||
.CreateTestInstance(testAppName);
|
||||
var configuration = Environment.GetEnvironmentVariable("Configuration") ?? "Debug";
|
||||
|
||||
var configuration = "Debug";
|
||||
|
||||
var testProjectDirectory = testInstance.TestRoot;
|
||||
|
||||
|
@ -104,7 +105,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
|
||||
new Build3Command()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute()
|
||||
.Execute($"-c {configuration}")
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
MSBuildTestProjectInstance =
|
||||
TestAssetsManager.CreateTestInstance("MSBuildTestAppWithToolInDependencies");
|
||||
_repoDirectoriesProvider = new RepoDirectoriesProvider();
|
||||
_configuration = "Debug";
|
||||
|
||||
new Restore3Command()
|
||||
.WithWorkingDirectory(MSBuildTestProjectInstance.Path)
|
||||
|
@ -35,11 +36,9 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
|
||||
new Build3Command()
|
||||
.WithWorkingDirectory(MSBuildTestProjectInstance.Path)
|
||||
.Execute()
|
||||
.Execute($"-c {_configuration}")
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
_configuration = Environment.GetEnvironmentVariable("Configuration") ?? "Debug";
|
||||
.Pass();
|
||||
|
||||
Environment.SetEnvironmentVariable(
|
||||
Constants.MSBUILD_EXE_PATH,
|
||||
|
|
Loading…
Reference in a new issue