Skip to content

Commit a56e095

Browse files
committed
Build: make sure failing tests actually fail the build target
1 parent a71e646 commit a56e095

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

build/Testing.fs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ open Fake.DotNet
77

88
let test testsDir testsProj framework =
99
//DotNet.test (withWorkingDirectory testsDir >> (fun o -> { o with Framework = Some framework; NoRestore = true; NoBuild = true; Configuration = DotNet.BuildConfiguration.Release })) testsProj
10-
DotNet.exec
11-
(fun c -> { c with WorkingDirectory = testsDir })
12-
(sprintf "run --project %s --configuration Release --framework %s --no-restore --no-build" testsProj framework)
13-
""
14-
|> ignore<ProcessResult>
10+
let result =
11+
DotNet.exec
12+
(fun c -> { c with WorkingDirectory = testsDir })
13+
(sprintf "run --project %s --configuration Release --framework %s --no-restore --no-build" testsProj framework)
14+
""
15+
if not result.OK then failwithf "Tests Failed: %A" result
16+

0 commit comments

Comments
 (0)