Skip to content

OutputCapture

type OutputCapture =
    {
        lines: ResizeArray<struct (StdStream * string)>
    }
Attributes[<ReferenceEquality>]

The lines a stage held back, in the order they were written.

One capture is shared by every step of the stage that declared it and by its sub-stages, so it locks: steps run in parallel, and a process's two streams are read on two threads of their own.

Fields

lines: ResizeArray<struct (StdStream * string)>

Functions and values

add (stream: StdStream) (line: string) (outputCapture: OutputCapture) : unit
clear: OutputCapture -> unit
count: OutputCapture -> int
create () : OutputCapture
entries: OutputCapture -> struct (StdStream * string) list

Everything written, each line paired with the stream it arrived on, in write order.

errorText: OutputCapture -> string
errors: OutputCapture -> string list

Only what went to stderr.

failureText (oc: OutputCapture) : string

What a failure lifts.

stderr when the process used it, and everything otherwise: a test runner that reports its failures on stdout is the ordinary case, and lifting only stderr there would lift nothing at all.

isEmpty: OutputCapture -> bool
lines: OutputCapture -> string list

Everything written, both streams, interleaved in the order it arrived.

text: OutputCapture -> string
trimTo (count: int) : OutputCapture -> unit

Discards every line after the first count.

A count at or above Count leaves the capture as it is.

Parameter
count