Created
August 19, 2015 10:17
-
-
Save GraemeBradbury/99406c6a34b49c033500 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Usage basics eg: | |
multinode remote | |
Will run any tests in the remote multinode test dll (. | |
The script finds any Tests.Multinode.dll file that also includes the arg passed in the command line. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
"c:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Fsi.exe" --exec multinode.fsx %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I @"src/packages/FAKE/tools" | |
#r "FakeLib.dll" | |
#r "System.Xml.Linq" | |
open System | |
open System.IO | |
open System.Text | |
open Fake | |
open Fake.FileUtils | |
open Fake.TaskRunnerHelper | |
open Fake.ProcessHelper | |
let first = fsi.CommandLineArgs.[1] | |
let multiNodeTestPath = findToolInSubPath "Akka.MultiNodeTestRunner.exe" "bin/core/Akka.MultiNodeTestRunner*" | |
printfn "Using MultiNodeTestRunner: %s" multiNodeTestPath | |
let targetFilter = sprintf "src/**/bin/Release/*%s*.Tests.MultiNode.dll" first | |
printfn "Using target filter: %s" targetFilter | |
let multiNodeTestAssemblies = !! targetFilter | |
let runMultiNodeSpec assembly = | |
let spec = getBuildParam "spec" | |
let args = new StringBuilder() | |
|> append assembly | |
|> append "-Dmultinode.enable-filesink=on" | |
|> appendIfNotNullOrEmpty spec "-Dmultinode.test-spec=" | |
|> toText | |
let result = ExecProcess(fun info -> | |
info.FileName <- multiNodeTestPath | |
info.WorkingDirectory <- (Path.GetDirectoryName (FullName multiNodeTestPath)) | |
info.Arguments <- args) (System.TimeSpan.FromMinutes 60.0) (* This is a VERY long running task. *) | |
if result <> 0 then failwithf "MultiNodeTestRunner failed. %s %s" multiNodeTestPath args | |
multiNodeTestAssemblies |> Seq.iter (runMultiNodeSpec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment