diff --git a/BUILD.md b/BUILD.md index ee62a397..43328e0d 100644 --- a/BUILD.md +++ b/BUILD.md @@ -48,6 +48,8 @@ The build script itself is `build.cake`, written in Cake's C#-like DSL using the `-archive`: Enable the generation of publishable archives after a build. + `-runTests`: Enable running of tests in the cake file. By default, the tests are skipped. + ## Targets **Default**: Alias for Local. diff --git a/build.cake b/build.cake index f61b65f9..e7da44ad 100644 --- a/build.cake +++ b/build.cake @@ -279,6 +279,7 @@ Task("DotnetPackPublished") Task("TestAll") .IsDependentOn("Test") .IsDependentOn("TestCore") + .WithCriteria(c => HasArgument("runTests")) .Does(() =>{}); /// @@ -287,6 +288,7 @@ Task("TestAll") Task("TestCore") .IsDependentOn("Setup") .IsDependentOn("Restore") + .WithCriteria(c => HasArgument("runTests")) .Does(() => { var testProjects = buildPlan.TestProjects @@ -311,6 +313,7 @@ Task("Test") .IsDependentOn("SRGen") .IsDependentOn("CodeGen") .IsDependentOn("BuildTest") + .WithCriteria(c => HasArgument("runTests")) .Does(() => { foreach (var pair in buildPlan.TestProjects)