Rebase with the latest sources and fix the tests.
This commit is contained in:
parent
ab455e6bb9
commit
9ec8556d24
7 changed files with 37 additions and 13 deletions
|
@ -56,6 +56,13 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
[Target]
|
||||
public static BuildTargetResult BuildTestPrerequisites(BuildTargetContext c)
|
||||
{
|
||||
BuildTestAssetPackages(c);
|
||||
BuildTestAssetProjects(c);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
public static void BuildTestAssetPackages(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage2;
|
||||
|
||||
|
@ -71,8 +78,24 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
public static void BuildTestAssetProjects(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage2;
|
||||
string testProjectsRoot = Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects");
|
||||
List<string> exclusionList = new List<string> { Path.Combine(testProjectsRoot, "CompileFail", "project.json") };
|
||||
var projects = Directory.GetFiles(testProjectsRoot, "project.json", SearchOption.AllDirectories)
|
||||
.Where(p => !exclusionList.Any(e => e.Contains(p)));
|
||||
|
||||
foreach (var project in projects)
|
||||
{
|
||||
c.Info($"Building: {project}");
|
||||
dotnet.Build("--framework", "dnxcore50")
|
||||
.WorkingDirectory(Path.GetDirectoryName(project))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue