diff --git a/src/app/FakeLib/FakeLib.fsproj b/src/app/FakeLib/FakeLib.fsproj index 0bbe4707516..f23b0cccbf0 100644 --- a/src/app/FakeLib/FakeLib.fsproj +++ b/src/app/FakeLib/FakeLib.fsproj @@ -71,6 +71,7 @@ + diff --git a/src/app/FakeLib/FuchuHelper.fs b/src/app/FakeLib/FuchuHelper.fs new file mode 100644 index 00000000000..06a4bdf45ef --- /dev/null +++ b/src/app/FakeLib/FuchuHelper.fs @@ -0,0 +1,19 @@ +module Fake.FuchuHelper + +/// Execute Fuchu tests from one or more assemblies. +/// Multiple assemblies are run concurrently. +/// ## Parameters +/// +/// - `testExes` - The paths of the executables containing Fuchu tests to run. +let Fuchu testExes = + let errorCode = + testExes + |> Seq.map (fun program -> if not isMono + then program, null + else "mono", program) + |> Seq.map (fun (program, args) -> asyncShellExec { defaultParams with Program = program; CommandLine = args }) + |> Async.Parallel + |> Async.RunSynchronously + |> Array.sum + if errorCode <> 0 + then failwith "Unit tests failed"