Skip to content

Commit

Permalink
Add failing test for an uneven diamond on parallel build order
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Oct 6, 2016
1 parent cc7e515 commit 5a9a2f4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/test/FsCheck.Fake/TestParallelBuildOrder.fs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,30 @@ let ``Diamonds are resolved correctly``() =
| _ ->
failwithf "unexpected order: %A" order

[<Fact>]
let ``Spurs run as early as possible``() =
TargetDict.Clear()
Target "a" DoNothing
Target "b" DoNothing
Target "c1" DoNothing
Target "c2" DoNothing
Target "d" DoNothing

// create a diamond graph
"a" ==> "b" ==> "d" |> ignore
"a" ==> "c1" ==> "c2" ==> "d" |> ignore

let order = determineBuildOrder "d"
validateBuildOrder order "d"

match order with
| [[|Target "a"|];TargetSet ["b"; "c1"];[|Target "c2"|];[|Target "d"|]] ->
// as expected
()

| _ ->
failwithf "unexpected order: %A" order


[<Fact>]
let ``Soft dependencies are respected when dependees are present``() =
Expand Down

0 comments on commit 5a9a2f4

Please sign in to comment.