Piotrp msft/msbuild/incremental test (#3842)

* Incremental Testing - Part 1

* Fix 'clean' bug

* Remove --fallbacksource from TestAssetPackage restore.
This commit is contained in:
Piotr Puszkiewicz 2016-07-12 17:10:48 -07:00 committed by GitHub
parent caa4cf373c
commit 16bedef2c5
7 changed files with 457 additions and 149 deletions

View file

@ -55,78 +55,4 @@ namespace Microsoft.DotNet.Cli.Build
base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
}
}
public class DotNetRestore : DotNetTool
{
protected override string Command
{
get { return "restore"; }
}
protected override string Args
{
get { return $"{GetVerbosity()}"; }
}
public string Verbosity { get; set; }
private string GetVerbosity()
{
if (!string.IsNullOrEmpty(Verbosity))
{
return $"--verbosity {Verbosity}";
}
return null;
}
}
public class DotNetTest : DotNetTool
{
protected override string Command
{
get { return "test"; }
}
protected override string Args
{
get { return $"{GetConfiguration()} {GetXml()} {GetNoTrait()}"; }
}
public string Configuration { get; set; }
public string Xml { get; set; }
public string NoTrait { get; set; }
private string GetConfiguration()
{
if (!string.IsNullOrEmpty(Configuration))
{
return $"--configuration {Configuration}";
}
return null;
}
private string GetNoTrait()
{
if (!string.IsNullOrEmpty(Configuration))
{
return $"-notrait {NoTrait}";
}
return null;
}
private string GetXml()
{
if (!string.IsNullOrEmpty(Xml))
{
return $"-xml {Xml}";
}
return null;
}
}
}