Skip to content

Commit

Permalink
Add built and run test build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jwood803 committed Oct 9, 2015
1 parent 0396942 commit 603939c
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions FakeDemo/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 _ ->
Expand Down Expand Up @@ -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"
RunTargetOrDefault "Run-UnitTests"

0 comments on commit 603939c

Please sign in to comment.