Skip to content

Commit

Permalink
Merge pull request #1268 from Kazark/fuchu
Browse files Browse the repository at this point in the history
Add initial support for Fuchu tests
  • Loading branch information
forki authored Jun 19, 2016
2 parents e81dd98 + fc24574 commit fd7d1fc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/FakeLib/FakeLib.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<Compile Include="FileUtils.fs" />
<Compile Include="UnitTest\UnitTestCommon.fs" />
<Compile Include="UnitTest\UnitTestHelper.fs" />
<Compile Include="FuchuHelper.fs" />
<Compile Include="UnitTest\NUnit\Xml.fs" />
<Compile Include="UnitTest\NUnit\Common.fs" />
<Compile Include="UnitTest\NUnit\Sequential.fs" />
Expand Down
19 changes: 19 additions & 0 deletions src/app/FakeLib/FuchuHelper.fs
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit fd7d1fc

Please sign in to comment.