From 603939c324101a04401bd156a8d6a169ff9d962e Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 9 Oct 2015 10:54:03 -0400 Subject: [PATCH] Add built and run test build targets --- FakeDemo/build.fsx | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/FakeDemo/build.fsx b/FakeDemo/build.fsx index 0865910..c0662e7 100644 --- a/FakeDemo/build.fsx +++ b/FakeDemo/build.fsx @@ -8,10 +8,25 @@ Target "Clean" (fun _ -> CleanDir buildDir ) -Target "Test" (fun _ -> +Target "Build-UnitTests" (fun _ -> + !! "FakeDemo.UnitTests/FakeDemo.UnitTests.csproj" + |> MSBuild "FakeDemo.UnitTests\bin\Debug" "Build" [ ("Configuration", "Debug"); ("Platform", "Any CPU") ] + |> Log "---Unit Test build output----" +) + +Target "Run-UnitTests" (fun _ -> let testDll = !! "FakeDemo.UnitTests/FakeDemo.UnitTests.csproj" - testDll |> NUnit ( fun defaults -> defaults) + testDll |> NUnit ( fun defaults -> + { + defaults with ToolPath = "/Library/Frameworks/Mono.framework/Commands/" + ToolName = "nunit-console4" + WorkingDir = "FakeDemo.UnitTests\bin\Debug" + }) +) + +Target "Run-UITests" (fun _ -> + trace "UI Tests" ) Target "Build-Pcl" (fun _ -> @@ -39,12 +54,12 @@ Target "Build-Droid" (fun _ -> ) "Clean" - ==> "Build-Pcl" - ==> "Test" + ==> "Build-UnitTests" + ==> "Run-UnitTests" "Clean" ==> "Build-Pcl" ==> "Build-iOS" ==> "Build-Droid" -RunTargetOrDefault "Test" \ No newline at end of file +RunTargetOrDefault "Run-UnitTests" \ No newline at end of file