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 testAppName = "MSBuildTestAppWithToolInDependencies";
|
||||||
var testInstance = TestAssetsManager
|
var testInstance = TestAssetsManager
|
||||||
.CreateTestInstance(testAppName);
|
.CreateTestInstance(testAppName);
|
||||||
var configuration = Environment.GetEnvironmentVariable("Configuration") ?? "Debug";
|
|
||||||
|
var configuration = "Debug";
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.TestRoot;
|
var testProjectDirectory = testInstance.TestRoot;
|
||||||
|
|
||||||
|
@ -104,7 +105,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
|
|
||||||
new Build3Command()
|
new Build3Command()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.Execute()
|
.Execute($"-c {configuration}")
|
||||||
.Should()
|
.Should()
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
||||||
MSBuildTestProjectInstance =
|
MSBuildTestProjectInstance =
|
||||||
TestAssetsManager.CreateTestInstance("MSBuildTestAppWithToolInDependencies");
|
TestAssetsManager.CreateTestInstance("MSBuildTestAppWithToolInDependencies");
|
||||||
_repoDirectoriesProvider = new RepoDirectoriesProvider();
|
_repoDirectoriesProvider = new RepoDirectoriesProvider();
|
||||||
|
_configuration = "Debug";
|
||||||
|
|
||||||
new Restore3Command()
|
new Restore3Command()
|
||||||
.WithWorkingDirectory(MSBuildTestProjectInstance.Path)
|
.WithWorkingDirectory(MSBuildTestProjectInstance.Path)
|
||||||
|
@ -35,11 +36,9 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
||||||
|
|
||||||
new Build3Command()
|
new Build3Command()
|
||||||
.WithWorkingDirectory(MSBuildTestProjectInstance.Path)
|
.WithWorkingDirectory(MSBuildTestProjectInstance.Path)
|
||||||
.Execute()
|
.Execute($"-c {_configuration}")
|
||||||
.Should()
|
.Should()
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
_configuration = Environment.GetEnvironmentVariable("Configuration") ?? "Debug";
|
|
||||||
|
|
||||||
Environment.SetEnvironmentVariable(
|
Environment.SetEnvironmentVariable(
|
||||||
Constants.MSBUILD_EXE_PATH,
|
Constants.MSBUILD_EXE_PATH,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue