CLI Testing via msbuild (#3779)
* Rebase * Remove Multi-Project Validator * Remove projectmodelserver tests * Enable test package creation * Incremental test restore * WiP * Enable Test Asset Project restore * Build Test Assets & Restore Test Projects * Build Test projects * Enable Test Execution also moves Test Targets to a well-known CLI Version [Stage 2] * Pass throuh existing telemetry profile * 2-space tabs * Revert TestTargets.cs * WiP PR feedback * Refactoring * Fix naming of RestoreTestAssetPackages * DotNetTest task * Fix merge issue * ExecuteWithCapturedOutput MSBuild considers StdErr output to be failures. This causes output of any test command which is expected to produce an error to be swallowed in the test. * Workaround for always-on tracing functionality in dotnet-test * Fix Path Separator Windows/Unix * Seperate package build from pack * Windows Pathing issues * PR Feedback * Workaround for msbuild #773 https://github.com/Microsoft/msbuild/issues/773
This commit is contained in:
parent
9885196eef
commit
08e9bc903e
25 changed files with 466 additions and 576 deletions
|
@ -80,4 +80,53 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue