binding redirects tests: Simplify and get ready for enabling (#4692)

* binding redirects tests: Simplify and get ready for enabling

* fix targets broken during cleanup

* fix non-windows build

* apply pr feedback: remove some not needed code

* remigrate BindingRedirects samples, add x64 to bind redir proj
This commit is contained in:
Krzysztof Wicher 2016-11-14 14:26:03 -08:00 committed by GitHub
parent 6d57ca7e14
commit 9212605e89
22 changed files with 363 additions and 387 deletions

View file

@ -16,6 +16,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private NuGetFramework _framework;
private string _runtime;
private bool _noDependencies;
private DirectoryInfo _outputPath;
@ -31,7 +33,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public override CommandResult Execute(string args = "")
{
args = $"build {GetNoDependencies()} {GetProjectFile()} {GetOutputPath()} {GetConfiguration()} {GetFramework()} {args}";
args = $"build {GetNoDependencies()} {GetProjectFile()} {GetOutputPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {args}";
if (_workingDirectory != null)
{
@ -76,6 +78,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return this;
}
public BuildPJCommand WithRuntime(string runtime)
{
_runtime = runtime;
return this;
}
public BuildPJCommand WithNoDependencies()
{
_noDependencies = true;
@ -131,6 +140,16 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return $"--framework {_framework.GetShortFolderName()}";
}
private string GetRuntime()
{
if (_runtime == null)
{
return null;
}
return $"--runtime {_runtime}";
}
private string GetNoDependencies()
{
if (!_noDependencies)