Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
@echo off
"c:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Fsi.exe" --exec multinode.fsx %*
#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
You can’t perform that action at this time.