Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for Fuchu tests #1268

Merged
merged 1 commit into from
Jun 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/FakeLib/FakeLib.fsproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I have marked this [<AutoOpen>]?


/// 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"