Fixing full framework tests

This commit is contained in:
Livar Cunha 2016-10-31 16:22:10 -07:00
parent c2f60cede4
commit 9139c4006b
10 changed files with 127 additions and 15 deletions

View file

@ -7,21 +7,40 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
{
public sealed class RestoreCommand : TestCommand
{
private string _runtime;
public RestoreCommand()
: base("dotnet")
{
}
public RestoreCommand WithRuntime(string runtime)
{
_runtime = runtime;
return this;
}
public override CommandResult Execute(string args = "")
{
args = $"restore {args} --disable-parallel";
args = $"restore {GetRuntime()} {args} --disable-parallel";
return base.Execute(args);
}
public override CommandResult ExecuteWithCapturedOutput(string args = "")
{
args = $"restore {args} --disable-parallel";
args = $"restore {GetRuntime()} {args} --disable-parallel";
return base.ExecuteWithCapturedOutput(args);
}
private string GetRuntime()
{
if (_runtime == null)
{
return null;
}
return $"/p:RuntimeIdentifier={_runtime}";
}
}
}