Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
cake
Browse files Browse the repository at this point in the history
  • Loading branch information
pomma89 committed Jun 2, 2017
1 parent 321dbc5 commit 2e97ddc
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,40 @@ Task("Build-Debug")
Build("Debug");
});

Task("Test-Debug")
Task("Build-Release")
.IsDependentOn("Build-Debug")
.Does(() =>
.Does(() =>
{
Test("Debug");
Build("Release");
});

Task("Build-Release")
.IsDependentOn("Test-Debug")
Task("Pack-Release")
.IsDependentOn("Build-Release")
.Does(() =>
{
Build("Release");
Pack("Release");
});

Task("Test-Release")
.IsDependentOn("Build-Release")
Task("Test-Debug")
.IsDependentOn("Pack-Release")
.Does(() =>
{
Test("Release");
Test("Debug");
});

Task("Pack-Release")
.IsDependentOn("Test-Release")
.Does(() =>
Task("Test-Release")
.IsDependentOn("Test-Debug")
.Does(() =>
{
Pack("Release");
Test("Release");
});

//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////

Task("Default")
.IsDependentOn("Pack-Release");
.IsDependentOn("Test-Release");

//////////////////////////////////////////////////////////////////////
// EXECUTION
Expand Down Expand Up @@ -107,18 +107,18 @@ private void Test(string cfg)
// NoResults = true
//});

const string flags = "--noheader --noresult";
const string flags = "--noheader --noresult --stoponerror";
const string errMsg = " - Unit test failure - ";

Parallel.ForEach(GetFiles("./test/**/bin/{cfg}/*/*.UnitTests.exe".Replace("{cfg}", cfg)), netExe =>
Parallel.ForEach(GetFiles("./test/*.UnitTests/**/bin/{cfg}/*/*.UnitTests.exe".Replace("{cfg}", cfg)), netExe =>
{
if (StartProcess(netExe, flags) != 0)
{
throw new Exception(cfg + errMsg + netExe);
}
});

Parallel.ForEach(GetFiles("./test/**/bin/{cfg}/*/*.UnitTests.dll".Replace("{cfg}", cfg)), netCoreDll =>
Parallel.ForEach(GetFiles("./test/*.UnitTests/**/bin/{cfg}/*/*.UnitTests.dll".Replace("{cfg}", cfg)), netCoreDll =>
{
DotNetCoreExecute(netCoreDll, flags);
});
Expand Down

0 comments on commit 2e97ddc

Please sign in to comment.