Skip to content

Commit

Permalink
run NBench test despite previous failed (#3443)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-bogomaz authored and Aaronontheweb committed May 10, 2018
1 parent 75eca06 commit f6bc729
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,17 @@ Target "NBench" <| fun _ ->
info.FileName <- nbenchTestPath
info.WorkingDirectory <- (Path.GetDirectoryName (FullName nbenchTestPath))
info.Arguments <- args) (System.TimeSpan.FromMinutes 45.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "NBench.Runner failed. %s %s" nbenchTestPath args

nbenchTestAssemblies |> Seq.iter runNBench
if result <> 0 then failwithf "%s %s \nexited with code %i" nbenchTestPath args result

let failedRuns =
nbenchTestAssemblies
|> Seq.map (fun asm -> try runNBench asm; None with e -> Some(e.ToString()))
|> Seq.filter Option.isSome
|> Seq.map Option.get
|> Seq.mapi (fun i s -> sprintf "%i: \"%s\"" (i + 1) s)
|> Seq.toArray
if failedRuns.Length > 0 then
failwithf "NBench.Runner failed for %i run(s):\n%s\n\n" failedRuns.Length (String.concat "\n\n" failedRuns)

//--------------------------------------------------------------------------------
// Nuget targets
Expand Down

0 comments on commit f6bc729

Please sign in to comment.